null safety

This commit is contained in:
phyothandar
2021-09-10 12:00:08 +06:30
parent a144c945b6
commit 5e672937b5
67 changed files with 901 additions and 896 deletions

View File

@@ -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();
})
],
),
);
},
);
}
}