canonical / canonical/ubuntu-flutter-plugins
[wizard_router] Allow enums for route names
- Dominant language
- Dart
- Stars
- 66
- Forks
- 16
- Avg merge
- 19m
- Merged PRs (30d)
- 1
Description
enums would allow compile-time checked routes. This doesn't have to replace the string API, using a generic parameter on the widget, or a different constructor would allow both.
```dart
enum WizardRoutes {
foo,
bar,
baz
}
Wizard(
routes: {
WizardRoutes.foo: WizardRoute(builder: (context) => FooPage()),
WizardRoutes.bar: WizardRoute(builder: (context) => BarPage()),
WizardRoutes.baz: WizardRoute(builder: (context) => BazPage()),
},
);
```
Contributor guide
Research direction
Start by locating the wizard_router package's Wizard and WizardRoute definitions and the existing string-based route API. Check how route names are stored, passed to the widget, and used for navigation. Done means enum-keyed routes are supported without removing the existing string API, with coverage for both forms.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- dart, flutter
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100