icemanbsi / searchable_dropdown

MIT License
107 stars 162 forks source link

Search bar works in simulator / running in debug on a physical device but not in built app #112

Open rch16 opened 3 years ago

rch16 commented 3 years ago

The search bar/function of the Searchable.Dialog works fine when running my flutter app in simulator or on a physical device in debug mode (i.e. connected by a cable). However, when I build -> archive -> validate -> distribute the app and open it using Test Flight, the search bar/function no longer works.

In simulator:

Simulator screenshot

On device:

Device screenshot

Code: List building:

List<DropdownMenuItem> unis = [];
for(String uni in universities) {
    unis.add(DropdownMenuItem(
        child: Text(uni),
        value: Text(uni),
      ));
    }

Searchable dropdown usage:

SearchableDropdown.single(
    items: unis,
    value: selectedValue,
    hint: Text(
        currentUni,
        style: TextStyle(
            color: Colors.black,
        )
    ),
    searchHint: "Select a University",
    displayClearIcon: false,
    isCaseSensitiveSearch: false,
    isExpanded: true,
    underline: Container(
        height: 50.0,
    ),
    onChanged: (value) {
        setState(() {
            if (value != null) {
                selectedValue = value.data;
                university = value.data;
                currentUni = value.data;
            }
        });
    },
),