Skip to content

Commit

Permalink
* Auto select text input for edit dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
Clon1998 committed Aug 29, 2021
1 parent 7f97537 commit a90d420
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
*.router.dart
*.logger.dart
*.g.dart
*.freezed.dart

# Web related
lib/generated_plugin_registrant.dart
Expand Down
9 changes: 5 additions & 4 deletions lib/ui/dialog/editForm/editForm_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ class NumField extends ViewModelWidget<EditFormViewModel> {
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),
Expand All @@ -86,10 +87,10 @@ class NumField extends ViewModelWidget<EditFormViewModel> {
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",
),
);
}
Expand Down
4 changes: 2 additions & 2 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit a90d420

Please sign in to comment.