Skip to content
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

Child actions code generation fails on 8.0.0 #159

Open
westracer opened this issue Jul 27, 2021 · 1 comment
Open

Child actions code generation fails on 8.0.0 #159

westracer opened this issue Jul 27, 2021 · 1 comment

Comments

@westracer
Copy link

Version 7.5.11 works fine, but I have to override dependencies to use it.

Minimal reproducible example:

abstract class HomeActions implements ReduxActions {
  HomeActions._();
  factory HomeActions() = _$HomeActions;
}

abstract class AppActions extends ReduxActions {
  AppActions._();
  factory AppActions() = _$AppActions;

  HomeActions get home;
}

causes:

[INFO] built_redux:built_redux on lib/domain/actions/app_actions.dart:Generating action classes for AppActions
[SEVERE] built_redux:built_redux on lib/domain/actions/app_actions.dart:
An error FormatterException occurred while formatting the generated source for
package:***/domain/actions/app_actions.dart
which was output to
lib/domain/actions/app_actions.built_redux.g.part.
This may indicate an issue in the generator, the input source code, or in the
source formatter.
Could not format because the source could not be parsed:

line 21, column 27 of .: Expected an identifier.

21 │ final home = HomeActions*();
│ ^

Note: My project doesn't use NNBD.

@westracer
Copy link
Author

Probably, there should be an option to generate code without null safety. For now, I have to pass "withNullability: false" to the getDisplayString method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant