maheshj01 / searchfield

A highly customizable simple and easy to use flutter Widget to add a searchfield to your Flutter Application.This Widget allows you to search and select from list of suggestions.
MIT License
84 stars 64 forks source link

Expose save-method of underlying TextFormField #92

Closed philitell closed 1 year ago

philitell commented 1 year ago

It would be really helpful if SearchField had a parameter "void Function(String?)? onSaved". With this method SearchField could be used in complex Forms. An Implementation should be possible by exposing the onSaved-method of the underlying TextFormField inside SearchField. The method could be usefull when using SearchField inside a Form-widget.

maheshj01 commented 1 year ago

Thanks for the feature request @philitell Feel free to file a PR if you are interested and I would be happy to review. I will try to land this anyways probably by end of this week.

expose onSaved: https://api.flutter.dev/flutter/widgets/FormField/onSaved.html

philitell commented 1 year ago

Thank you @maheshmnj - this would be great. Same thing could be done for "onTapOutside" method - https://api.flutter.dev/flutter/material/TextField/onTapOutside.html This would also be very usefull.

maheshj01 commented 1 year ago

Same thing could be done for "onTapOutside" method - https://api.flutter.dev/flutter/material/TextField/onTapOutside.html This would also be very usefull.

@philitell Can you file that as a separate issue so that we can independently track these requests.

maheshj01 commented 1 year ago

Fixed in Release v0.8.4 Thank you for your contribution! cc: @philitell