I face the issue several times after using the package.
I think, in dropdown_search.dart file, at 375 line it must be checked if context is mounted before updating state (which is in "didChange" callback)
if (state.value != getSelectedItem) {
WidgetsBinding.instance.addPostFrameCallback((_) {
if (!context.mounted) return; // TODO (maybe) add this line of code
state.didChange(getSelectedItem);
});
}
flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, 3.22.3, on macOS 12.7.1 21G920 darwin-arm64
(Rosetta), locale en-UZ)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[!] Xcode - develop for iOS and macOS (Xcode 14.2)
! Flutter recommends a minimum Xcode version of 15.
Download the latest version or update via the Mac App Store.
[✓] Chrome - develop for the web
[✓] Android Studio (version 2023.2)
[✓] Connected device (4 available)
[✓] Network resources
I face the issue several times after using the package.
I think, in dropdown_search.dart file, at 375 line it must be checked if context is mounted before updating state (which is in "didChange" callback)
flutter doctor
Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.22.3, on macOS 12.7.1 21G920 darwin-arm64 (Rosetta), locale en-UZ) [✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0) [!] Xcode - develop for iOS and macOS (Xcode 14.2) ! Flutter recommends a minimum Xcode version of 15. Download the latest version or update via the Mac App Store. [✓] Chrome - develop for the web [✓] Android Studio (version 2023.2) [✓] Connected device (4 available)[✓] Network resources