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

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

Open
kulveersingh opened this issue Nov 25, 2020 · 1 comment

Comments

@kulveersingh
Copy link

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

Does anybody else get it too ?

@erkhemee
Copy link

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();

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

2 participants