searchable_dropdown
searchable_dropdown copied to clipboard
Return old value after first select.
Current API Version searchable_dropdown: ^1.1.3
Flutter Doctor
[✓] Flutter (Channel stable, v1.12.13+hotfix.9, on Mac OS X 10.15.3 19D76, locale en-KH)
[✓] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 11.4)
[✓] Android Studio (version 3.4)
[✓] VS Code (version 1.44.2)
[✓] Connected device (2 available)
• No issues found!
[Note: The problem is not 100% occurred, but mostly it happens on iOS below 13 and also Android Emulator (API R)]
The problem is
- when we first launch the app and selected the value from the dropdown, it returns the correct value back. (exp: Select A and it return A)
- But when I try to select a new value [B] from dropdown again, it returns the old value of [A] instead.
It sounds weird, but the problem sometimes disappears when I tried to clean the project a few times.
My BaseDropDownTextField class. BaseDropDownTextField.log
UPDATE NOTE This problem seems to happen randomly, I've tried on my iPhoneXS 13.3, the problem also happens.
++ @lcuis @icemanbsi
NOTE This is record from my iPhoneXS.
same problum ,is there any way to reset the dropdown,
I have same issue on version 1.1.3. This problem solved after rollback to version 1.1.2
I found out that the problem happened when my class is using MediaQuery.of(context).size.---
. I've fixed the problem by removing that. But I don't know the exact cause of that too.
i have same issue already. İs there any body solved that problem? May you help please?
i have same issue already. İs there any body solved that problem? May you help please?
It seems that @boungly have the right answer but anyone can use it with MediaQuery.... ? I need it for responsive devices using larger text
This is the major issue, for me this is the happening in all times and i have tried different 4 devices and its also happening in all devices.
a lot of hard work I recognized it and fixed it.
Value :
this is the actual create a issue
SearchableDropdown(
value: selectedState, ------- // remove or comment this line
items: stateDropdownItems,
hint: Text('Select a State'),
searchHint: new Text(
'Search a State' ),
onChanged: (value) {
setState(() {
selectedState = value;
});
},
isExpanded: true,
)`
a lot of hard work I recognized it and fixed it.
Value :
this is the actual create a issueSearchableDropdown( value: selectedState, ------- // remove or comment this line items: stateDropdownItems, hint: Text('Select a State'), searchHint: new Text( 'Search a State' ), onChanged: (value) { setState(() { selectedState = value; }); }, isExpanded: true, )`
For solve this : https://github.com/icemanbsi/searchable_dropdown/issues/55#issuecomment-639377263
I have the same issue, but I found anther plugin.
It's have a lot of features (such as InputDecoration 😍), and it's look like the TextFormField()
. So your UI will be the same.
I recommend you to use this amazing plugin : dropdown_search
a lot of hard work I recognized it and fixed it.
Value :
this is the actual create a issueSearchableDropdown( value: selectedState, ------- // remove or comment this line items: stateDropdownItems, hint: Text('Select a State'), searchHint: new Text( 'Search a State' ), onChanged: (value) { setState(() { selectedState = value; }); }, isExpanded: true, )`
Well but if you remove this line, how can you initialize value ?