update image resolution and search bar cursor color
This commit is contained in:
@@ -19,6 +19,7 @@ class MarketEditor extends StatefulWidget {
|
||||
|
||||
class _MarketEditorState extends State<MarketEditor> {
|
||||
TextEditingController _marketNameCtl = new TextEditingController();
|
||||
final _formKey = GlobalKey<FormState>();
|
||||
|
||||
bool _isLoading = false;
|
||||
List<String> markets = [];
|
||||
@@ -141,36 +142,46 @@ class _MarketEditorState extends State<MarketEditor> {
|
||||
await showDialog<String>(
|
||||
context: context,
|
||||
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,
|
||||
),
|
||||
)
|
||||
return Form(
|
||||
key: _formKey,
|
||||
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,
|
||||
validator: (value) {
|
||||
if (value!.isEmpty) {
|
||||
return "Enter market name";
|
||||
}
|
||||
return null;
|
||||
},
|
||||
),
|
||||
)
|
||||
],
|
||||
),
|
||||
actions: <Widget>[
|
||||
new TextButton(
|
||||
child: LocalText(context, "btn.cancel", color: primaryColor),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
}),
|
||||
new TextButton(
|
||||
child: LocalText(
|
||||
context,
|
||||
"btn.save",
|
||||
color: primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
if (!_formKey.currentState!.validate()) return;
|
||||
Navigator.pop(context);
|
||||
_add();
|
||||
})
|
||||
],
|
||||
),
|
||||
actions: <Widget>[
|
||||
new TextButton(
|
||||
child: LocalText(context, "btn.cancel", color: primaryColor),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
}),
|
||||
new TextButton(
|
||||
child: LocalText(
|
||||
context,
|
||||
"btn.save",
|
||||
color: primaryColor,
|
||||
),
|
||||
onPressed: () {
|
||||
Navigator.pop(context);
|
||||
_add();
|
||||
})
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user