-
Notifications
You must be signed in to change notification settings - Fork 162
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
Bloc was not initialized in Widget test cases #627
Comments
Questions like this are best asked on a user forum like StackOverflow or the Flutter Discord server. They have more eyes than just the maintainers to look. |
class TestBlocMock extends Mock implements ResizeBloc {} This is a problem (it might be the problem you are facing, but can't tell for sure, there might be others as well). I don't really know what this @srawlins @natebosch Should we update the docs and scrap all the examples without using codegen? |
Yes. |
I utilized Container and Text widgets in Flutter to create a basic example, and also incorporated a test case for my sample. However, during the test run(widget test case), I encountered a null exception as the bloc was not initialized. I have included my sample for your convenience. Is there a solution to address this issue?
Main.dart file
The text was updated successfully, but these errors were encountered: