You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[SEVERE] freezed:freezed on lib/state/second_state/second_state.dart:
Error running FreezedGenerator
Marked SecondState with @freezed, but freezed has nothing to generate
package:example/state/second_state/second_state.dart:6:16
╷
6 │ abstract class SecondState with _$SecondState {
│ ^^^^^^^^^^^
╵
Did I forget something? All other state files fail as well (so it's not the fact that both fields have ignore: true at JsonKey)
The text was updated successfully, but these errors were encountered:
A similar problem is still happening in version 0.10.6 - If you have comments in between the variables, and these comments have parenthesis, you MUST close the parenthesis or freezed won't be able to generate the files:
@freezed
abstract class MyClass with _$MyClass {
const factory MyClass({
@required String myStr1,
@required bool myBool1,
/// These comments Cause problems only when I (don't close the parenthesis
// It doesn't matter if you have two or three bar comments, or single quotes, as long as you (close the parenthesis, you'll be fine)
@required String mySpecialStr,
}) = _MyClass;
}
File:
Error:
Did I forget something? All other state files fail as well (so it's not the fact that both fields have ignore: true at JsonKey)
The text was updated successfully, but these errors were encountered: