Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

new properties to form and TextInput widget for keyboard dissmiss control #1890

Merged
merged 3 commits into from
Feb 26, 2025

Conversation

mehsaandev
Copy link
Contributor

@mehsaandev mehsaandev commented Feb 26, 2025

@@ -68,6 +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),
Copy link
Member

@sharjeelyunus sharjeelyunus Feb 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fallback should be from the controller, don't duplicate the same thing,
try this

'dismissKeyboardOnSubmit': (value) => _controller
              .dismissKeyboardOnSubmit =
          Utils.getBool(value, fallback: _controller.dismissKeyboardOnSubmit),

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@@ -110,6 +111,7 @@ class FormController extends WidgetController {
String? labelOverflow;
bool? enabled;
bool? readOnly;
bool dismissKeyboardOnSubmit = true;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also use the same property name for both, form and textinput
dismissibleKeyboard

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@mehsaandev mehsaandev merged commit b64d8cd into main Feb 26, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants