null safety
This commit is contained in:
@@ -61,7 +61,8 @@ class _MarketEditorState extends State<MarketEditor> {
|
||||
appBar: AppBar(
|
||||
centerTitle: true,
|
||||
leading: new IconButton(
|
||||
icon: new Icon(CupertinoIcons.back, color: primaryColor, size: 30),
|
||||
icon:
|
||||
new Icon(CupertinoIcons.back, color: primaryColor, size: 30),
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
),
|
||||
shadowColor: Colors.transparent,
|
||||
@@ -150,37 +151,39 @@ class _MarketEditorState extends State<MarketEditor> {
|
||||
_showDialog(BuildContext context) async {
|
||||
await showDialog<String>(
|
||||
context: context,
|
||||
child: new AlertDialog(
|
||||
contentPadding: const EdgeInsets.all(16.0),
|
||||
content: new Row(
|
||||
children: <Widget>[
|
||||
new Expanded(
|
||||
child: InputText(
|
||||
labelTextKey: "market.edit.name",
|
||||
controller: _marketNameCtl,
|
||||
autoFocus: true,
|
||||
),
|
||||
)
|
||||
builder: (BuildContext context) {
|
||||
return new AlertDialog(
|
||||
contentPadding: const EdgeInsets.all(16.0),
|
||||
content: new Row(
|
||||
children: <Widget>[
|
||||
new Expanded(
|
||||
child: InputText(
|
||||
labelTextKey: "market.edit.name",
|
||||
controller: _marketNameCtl,
|
||||
autoFocus: true,
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
actions: <Widget>[
|
||||
new FlatButton(
|
||||
child: LocalText(context, "btn.cancel", color: primaryColor),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
}),
|
||||
new FlatButton(
|
||||
child: LocalText(
|
||||
context,
|
||||
"btn.save",
|
||||
color: primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
_add();
|
||||
})
|
||||
],
|
||||
),
|
||||
actions: <Widget>[
|
||||
new FlatButton(
|
||||
child: LocalText(context, "btn.cancel", color: primaryColor),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
}),
|
||||
new FlatButton(
|
||||
child: LocalText(
|
||||
context,
|
||||
"btn.save",
|
||||
color: primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
_add();
|
||||
})
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user