ResoCoder/flutter-tdd-clean-architecture-course

Error-The superclass, 'Bloc<NumberTriviaEvent, NumberTriviaState>', has no unnamed constructor that takes no arguments.

kulveersingh opened this issue · 1 comments

Error: The superclass, 'Bloc<NumberTriviaEvent, NumberTriviaState>', has no unnamed
constructor that takes no arguments.
NumberTriviaBloc({
^^^^^^^^^^^^^^^^
Error: Compilation failed.

Does anybody else get it too ?

initialState property was removed from flutter_bloc since v5.0.0. Using super() constructor instead, it may help?

NumberTriviaBloc({
@required GetConcreteNumberTrivia concrete,
@required GetRandomNumberTrivia random,
@required this.inputConverter,
}) : assert(concrete != null),
assert(random != null),
assert(inputConverter != null),
getConcreteNumberTrivia = concrete,
getRandomNumberTrivia = random,
super(Empty());

//@OverRide
//NumberTriviaState get initialState => Empty();