Reset settings from within a PrefPage does not reset all Pref Widgets
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 17
- Forks
- 10
- Avg merge
- 28m
- Merged PRs (30d)
- 1
Description
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
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reset through the Support child PrefPage using PrefServiceShared.set and setState, then compare the root PrefText widgets with the PrefDropdown widgets. Trace how PrefText receives preference changes and how switching pages refreshes them; done means resetting settings immediately updates all widgets without leaving the page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100