update image resolution and search bar cursor color

This commit is contained in:
tzw
2025-02-10 11:23:38 +06:30
parent fb6a9f691a
commit 9fdc20a61b
13 changed files with 246 additions and 203 deletions

View File

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