Request: Error Message, when pref not found in default values
Nobody has claimed this yet.
- Dominant language
- Dart
- Stars
- 17
- Forks
- 10
- Avg merge
- 28m
- Merged PRs (30d)
- 1
Description
Preface: I am relatively new to flutter.
It took me some time to find out why my setting pages was freezing without any comment or error: the identifier I provided in "prefs:" was not the same as defined in the "defaults", used in setting up final service = await PrefServiceShared.init(defaults: ...)
Since this might be a quite common mistake, a small error message might be helpful.
Edit: It might also be that the freeze came due to some information provided in default not being the appropriate variable type.
PrefDropdown<String>(
title: Text('Analysis time'),
pref: 'identifier1',
items: [
DropdownMenuItem(value: '500', child: Text('500 ms')),
DropdownMenuItem(value: '750', child: Text('750 ms')),
DropdownMenuItem(value: '1000', child: Text('1000 ms')),
],
),
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 locating PrefServiceShared.init and the PrefDropdown handling for the pref identifier shown in the issue. Reproduce both a missing default identifier and an inappropriate default variable type, then make the failure report an actionable error instead of freezing; verify the affected preference setup works as expected.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- mobile-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100