textfield_tags icon indicating copy to clipboard operation
textfield_tags copied to clipboard

Add custom data type support

Open ashishpipaliya opened this issue 2 years ago • 1 comments

Getting 'Instance of 'MasterData' when I use AutComplete<MasterData>. see code below Screenshot 2022-08-19 at 11 49 23 AM

 optionsBuilder: (TextEditingValue textEditingValue) {
                                if (textEditingValue.text == '') {
                                  return const Iterable<MasterData>.empty();
                                }
                                return addNewProjectsProvider.serviceList.where((MasterData option) {
                                  return option.typeName!.contains(textEditingValue.text.toLowerCase());
                                });
                              },

After selecting any item, it shows name properly. Screenshot 2022-08-19 at 11 51 40 AM

So, is there any way to change 'Instance of 'MasterData' to actual type(MasterData.typeName) ?

ashishpipaliya avatar Aug 19 '22 06:08 ashishpipaliya

This has nothing to do with this package. This is happening because your object MasterData doesn't return a text object which is needed to be displayed by Autocompleter widget.

eyoeldefare avatar Sep 15 '22 16:09 eyoeldefare

Our widget actually supports this now. But note AutComplete is not our widget

eyoeldefare avatar Mar 09 '24 19:03 eyoeldefare