After upgrading my Flutter, Freezed appears to generate files that have errors in them for my Bloc/Cubit files.
Pubspec.yaml has all the latest versions for the packages.
part of 'test_cubit.dart';
@freezed
abstract class TestState with _$TestState {
const factory TestState.initial() = _Initial;
const factory TestState.loaded(String someValue) = _Loaded;
}
Would be generated as (only excerpt where error occurs)
/// @nodoc
class _$TestStateTearOff {
const _$TestStateTearOff();
_Initial initial() {
return const _Initial();
}
_Loaded loaded( String* someValue) {
return _Loaded(someValue,);
}
}
Image of the errors
When I delete the * it all works just fine. Can anyone shed some light on this please?