From a90d420efe0e415037a6cdbc1393d8712f13ea4b Mon Sep 17 00:00:00 2001 From: Patrick Schmidt Date: Sun, 29 Aug 2021 21:14:14 +0200 Subject: [PATCH] * Auto select text input for edit dialog --- .gitignore | 1 + lib/ui/dialog/editForm/editForm_view.dart | 9 +++++---- pubspec.yaml | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index ea2edf6f..b50b2391 100644 --- a/.gitignore +++ b/.gitignore @@ -34,6 +34,7 @@ *.router.dart *.logger.dart *.g.dart +*.freezed.dart # Web related lib/generated_plugin_registrant.dart diff --git a/lib/ui/dialog/editForm/editForm_view.dart b/lib/ui/dialog/editForm/editForm_view.dart index bceb9f53..2b9fb02a 100644 --- a/lib/ui/dialog/editForm/editForm_view.dart +++ b/lib/ui/dialog/editForm/editForm_view.dart @@ -73,6 +73,7 @@ class NumField extends ViewModelWidget { num upperBorder = passedData.max ?? 300; //ToDo set to printers Max temp return FormBuilderTextField( + autofocus: true, validator: FormBuilderValidators.compose([ FormBuilderValidators.max(context, upperBorder), FormBuilderValidators.min(context, lowerBorder), @@ -86,10 +87,10 @@ class NumField extends ViewModelWidget { keyboardType: TextInputType.numberWithOptions(signed: false, decimal: false), decoration: InputDecoration( - border: const UnderlineInputBorder(), - contentPadding: EdgeInsets.all(8.0), - labelText: request.description, - helperText: "Enter a value between $lowerBorder and $upperBorder", + border: const UnderlineInputBorder(), + contentPadding: EdgeInsets.all(8.0), + labelText: request.description, + helperText: "Enter a value between $lowerBorder and $upperBorder", ), ); } diff --git a/pubspec.yaml b/pubspec.yaml index 428e3f37..b8175abc 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -104,8 +104,8 @@ flutter: # To add assets to your application, add an assets section, like this: assets: - - assets/images/ - - assets/icon/ + - assets/images/ + - assets/icon/ # - images/a_dot_ham.jpeg # An image asset can refer to one or more resolution-specific "variants", see