form_bloc icon indicating copy to clipboard operation
form_bloc copied to clipboard

Type Ahead not enabled for web?

Open coleweinman opened this issue 4 years ago • 8 comments

I noticed that the suggestions feature for the TextFieldBloc is purposely disabled for the web. Is there a reason for this? I've used the TypeAhead widget elsewhere and it appears to work fine on the web.

coleweinman avatar May 31 '20 04:05 coleweinman

Yeah, missing this feature as well.

Just submitted this https://github.com/IsaiasSantana/keyboard_utils/pull/21 and everything seems to work after that.

ayushin avatar Jun 03 '20 19:06 ayushin

https://github.com/IsaiasSantana/keyboard_utils/pull/21 is merged, so if we depend on keyboard_utils: ^1.2.3 the below works as well:

https://github.com/GiancarloCode/form_bloc/pull/101

ayushin avatar Jun 04 '20 06:06 ayushin

Hello, the plugin was disabled for web since when I implemented it, it had several crucial errors, and I had to fix them in the mobile implementation, so to enable web support I would have to fix several things that is not the idea of this package, since that I would have to support that plugin.

I have not been able to review its latest version, but it still has several relevant issues.

If you find an alternative plugin we could easily integrate it :)

GiancarloCode avatar Jun 04 '20 20:06 GiancarloCode

@GiancarloCode can you be more specific about those critical issues?

After the keyboard_utils fix all seem to work just fine.

ayushin avatar Jun 05 '20 06:06 ayushin

@ayushin I know that flutter_typeahead is still buggy on the web. There is a problem where the pointer is offset of the list. There is a workaround, but it doesn't work out of the box. See the workaround here This workaround could be included to make it work on the web.

coleweinman avatar Jun 05 '20 16:06 coleweinman

@RedTech64 is flutter_typeahead still buggy on web? it seem to be working just fine for us without any workarounds for quite a some time now. @GiancarloCode Can we use flutter_typeahead regardless of the platform?

ayushin avatar Aug 02 '20 10:08 ayushin

@ayushin I've still been using a workaround to get it to display correctly. But I agree it would be great to be able to enable it on the web by default.

coleweinman avatar Aug 02 '20 15:08 coleweinman

I was thinking an optional bool to the TextFieldBlocBuilder something like alwaysUseTypeAheadField which would be false by default to stay backwards compatible?

ayushin avatar Aug 02 '20 15:08 ayushin