Skip to content

Commit

Permalink
renamed dismissKeyboardOnSubmit to dismissibleKeyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
mehsaandev committed Feb 26, 2025
1 parent d842912 commit 18694ec
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/ensemble/lib/layout/form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class EnsembleForm extends StatefulWidget
_controller.labelStyle = Utils.getTextStyle(value),
'enabled': (value) => _controller.enabled = Utils.optionalBool(value),
'readOnly': (value) => _controller.readOnly = Utils.optionalBool(value),
'dismissKeyboardOnSubmit': (value) => _controller.dismissKeyboardOnSubmit = Utils.getBool(value, fallback: true),
'dismissibleKeyboard': (value) => _controller.dismissibleKeyboard = Utils.getBool(value, fallback: _controller.dismissibleKeyboard),
'width': (value) => _controller.width = Utils.optionalInt(value),
'height': (value) => _controller.height = Utils.optionalInt(value),
'gap': (value) => _controller.gap =
Expand Down Expand Up @@ -111,7 +111,7 @@ class FormController extends WidgetController {
String? labelOverflow;
bool? enabled;
bool? readOnly;
bool dismissKeyboardOnSubmit = true;
bool dismissibleKeyboard = true;

// labelMaxWidth applicable only to labelPosition=start
int? labelMaxWidth;
Expand Down
2 changes: 1 addition & 1 deletion modules/ensemble/lib/widget/helpers/form_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ class FormHelper {
}
}
// only dismiss keyboard if dismissKeyboardOnSubmit is true (By default it is true)
if(formState?.widget.controller.dismissKeyboardOnSubmit == true) {
if(formState?.widget.controller.dismissibleKeyboard == true) {
FocusManager.instance.primaryFocus?.unfocus();
}
}
Expand Down
2 changes: 1 addition & 1 deletion modules/ensemble/lib/widget/input/form_textfield.dart
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ abstract class BaseTextInput extends StatefulWidget
'enableClearText': (value) =>
_controller.enableClearText = Utils.optionalBool(value),
'dismissibleKeyboard': (value) =>
_controller.dismissibleKeyboard = Utils.getBool(value, fallback: true),
_controller.dismissibleKeyboard = Utils.getBool(value, fallback: _controller.dismissibleKeyboard),
'obscureToggle': (value) =>
_controller.obscureToggle = Utils.optionalBool(value),
'obscured': (widget) => _controller.obscureText == true,
Expand Down

0 comments on commit 18694ec

Please sign in to comment.