Open kris175 opened 5 months ago
Could be related to this issue - https://github.com/flutter-form-builder-ecosystem/flutter_form_builder/pull/1389
I think this is just a bug. When reset() is called, onChange gets called twice for FormBuilderDropdown widgets: first with the correct (original) value, then with the incorrect (current value). Net result: the value doesn't get reset to the original value. (flutter_form_builder: ^9.4.1)
... which is the same issue mentioned here: https://github.com/flutter-form-builder-ecosystem/flutter_form_builder/issues/1371
Is there an existing issue for this?
Package/Plugin version
9.3.0
Platforms
Flutter doctor
Flutter doctor
```bash Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, 3.22.1, on macOS 14.5 23F79 darwin-arm64, locale en-AU) [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 15.4) [✓] Chrome - develop for the web [✓] Android Studio (version 2022.1) [✓] IntelliJ IDEA Community Edition (version 2023.2.2) [✓] VS Code (version 1.89.1) [✓] Connected device (5 available) [✓] Network resources • No issues found! ```Minimal code example
Code sample
```dart class MyForm extends StatefulWidget { const MyForm({super.key}); @override _MyFormState createState() => _MyFormState(); } class _MyFormState extends StateCurrent Behavior
The dropdown field is not reverting to the initial value upon form reset. It instead retains the value that has been selected prior to reset.
Expected Behavior
Dropdown field should be reset to initial value when the form is reset
Steps To Reproduce
Aditional information