skip to Main Content

Widget Test – "MethodChannelFirebase.channel" the getter channel isn't defined for the type MethodChannelFirebase. What is the current best practice?

Previously I used the following code to ensure Firebase was initialised ... typedef Callback = void Function(MethodCall call); void setupFirebaseAuthMocks([Callback? customHandlers]) { TestWidgetsFlutterBinding.ensureInitialized(); setupFirebaseCoreMocks(); ///todo fix this MethodChannelFirebase.channel.setMockMethodCallHandler((call) async { if (call.method == 'Firebase#initializeCore') { return [ { 'name': defaultFirebaseAppName,…

VIEW QUESTION
Back To Top
Search