flutter_pref icon indicating copy to clipboard operation
flutter_pref copied to clipboard

Reset settings from within a PrefPage does not reset all Pref Widgets

Open bernd70 opened this issue 2 years ago • 2 comments

For beta testing reasons I did implement a "reset configuration" PrefButton and implemented it in a "Support" child PrefPage.

The reset function calls

 var prefService = Get.find<PrefServiceShared>();

await prefService.set(<Id>, <DefaultValue>);
...

setState(() {});

This resets the settings but strangely the PrefText() elements in the root PrefPage are not cleared. If i switch to another page and then back to settings, the field is empty. The PrefDropdown fields on the other hand are reset to the default values.

Is this a bug or am I doing something wrong?

Bernd

bernd70 avatar Apr 15 '23 12:04 bernd70

Yes, this might be a bug.

DavBfr avatar Apr 15 '23 13:04 DavBfr

Or can it be a UI state handling issue of the app?

MrCsabaToth avatar Oct 10 '23 17:10 MrCsabaToth