-
-
Notifications
You must be signed in to change notification settings - Fork 256
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[stacked_generator] Missing prefix of enum default value in app.router.dart #745
Comments
Hi there, thanks for filing an issue. We have fixed this before. Can you confirm the version of the stacked_generator that you're currently using in your pubspec.yaml? |
I am using |
Aaaah, I see. The default value as a list of enums is what breaks it. Normal enums work. When I get some time I'll fix this up. I might only get time in the next few days. |
Hi @eb-so , this is also an issue with importing prefixes on routes with type parameters. The import and prefix are at the top of the Thanks!
@StackedApp(
routes: [
AdaptiveRoute(page: StartupView, initial: true),
CustomRoute(
page: LoginView,
transitionsBuilder: TransitionsBuilders.slideTop,
durationInMilliseconds: 300,
),
AdaptiveRoute<Customer>(page: CustomerSelectionView),
AdaptiveRoute<CategoryType>(page: CategorySelectionView),
],
dependencies: [
// stacked services
LazySingleton(classType: NavigationService),
],
logger: StackedLogger(),
)
class App {
// This class has no purpose besides housing the annotation that generates
// the required functionality.
} |
Please confirm it works on 0.8.1-beta.3 @cvphat then I'll promote to stable. |
@FilledStacks , It does not work. I also tried to run |
I didn't change that but you can create a separate issue for it |
@eb-so , I created a new repo to reproduce and added some code to generate router. The bug is still happening. Please help to see this https://github.com/cvphat/stacked_issue |
@cvphat I found the issue, I'll fix it quickly |
I have a view with default value is an enum in constructor like this:
app.router.dart
![image](https://user-images.githubusercontent.com/50006020/197726502-4ea13be6-c5dd-440a-a2d5-5e3c986942b3.png)
The text was updated successfully, but these errors were encountered: