════════ Exception caught by widgets library ═══════════════════════════════════
The following NoSuchMethodError was thrown building MainScreen(dirty, state: _MainScreenState#4057c):
The getter 'bloc' was called on null.
Receiver: null
Tried calling: bloc
The relevant error-causing widget was
MainScreen
lib\main.dart:18
When the exception was thrown, this was the stack
Getting error at the time of compilation:
════════ Exception caught by widgets library ═══════════════════════════════════ The following NoSuchMethodError was thrown building MainScreen(dirty, state: _MainScreenState#4057c): The getter 'bloc' was called on null. Receiver: null Tried calling: bloc
The relevant error-causing widget was MainScreen lib\main.dart:18 When the exception was thrown, this was the stack
0 Object.noSuchMethod (dart:core-patch/object_patch.dart:51:5)
1 BlocProvider.of
package:flutter_audio_query_example/…/bloc/BlocProvider.dart:21
2 _MainScreenState.build
package:flutter_audio_query_example/…/screens/MainScreen.dart:46
3 StatefulElement.build
package:flutter/…/widgets/framework.dart:4744
4 ComponentElement.performRebuild
any suggestion?? Please share. Thanks.