You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[ERROR:flutter/lib/ui/ui_dart_state.cc(157)]Unhandled Exception: ServicesBinding.defaultBinaryMessengerwasaccessedbeforethebindingwasinitializedIfyou're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
Ifyou're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's`main()`methodtoinitializethebinding.
#0defaultBinaryMessenger.<anonymousclosure>(package:flutter/src/services/binary_messenger.dart:76:7)
#1defaultBinaryMessenger(package:flutter/src/services/binary_messenger.dart:89:4)
#2MethodChannel.binaryMessenger(package:flutter/src/services/platform_channel.dart:140:62)
#3MethodChannel.setMethodCallHandler(package:flutter/src/services/platform_channel.dart:375:5)
#4newMethodChannelFirestore(package:cloud_firestore_platform_interface/src/method_channel/method_channel_firestore.dart:27:13)
#5FirestorePlatform.instance(package:cloud_firestore_platform_interface/cloud_firestore_platform_interface.dart:62:19)
#6newFirestore(package:cloud_firestore/src/firestore.dart:26:42)
#7Firestore.instance(package:cloud_firestore/src/firestore.dart:29:36)
#8newDatabaseService(package:my-app/core/services/database/database.service.dart:8:41)
#9newExpertService(package:my-app/features/expert/expert.service.dart)
#10registerServices(package:my-app/features/utils.dart:13:27)
#11main(package:my-app/main.dart:11:3)
#12_runMainZoned.<anonymousclosure>.<anonymousclosure>(dart:ui/hooks.dart:239:25)
#13_rootRun(dart:async/zone.dart:1126:13)
#14_CustomZone.run(dart:async/zone.dart:1023:19)
#15_runZoned(dart:async/zone.dart:1518:10)
#16runZoned(dart:async/zone.dart:1502:12)
#17_runMainZoned.<anonymousclosure>(dart:ui/hooks.dart:231:5)
#18_startIsolate.<anonymousclosure>(dart:isolate-patch/isolate_patch.dart:307:19)
#19_RawReceivePortImpl._handleMessage(dart:isolate-patch/isolate_patch.dart:174:12)
Thank you in advance and I hope you can help me!
The text was updated successfully, but these errors were encountered:
I think it's exactly stated in your error message:
If you're running an application and need to access the binary messenger before `runApp()` has been called (for example, during plugin initialization), then you need to explicitly call the `WidgetsFlutterBinding.ensureInitialized()` first.
If you're running a test, you can call the `TestWidgetsFlutterBinding.ensureInitialized()` as the first line in your test's `main()` method to initialize the binding.
Uh oh!
There was an error while loading. Please reload this page.
Hi @escamoteur and thank you for your talk last week in Köln :) so I decided to give get_it a try but unfortunately got into troubles.
How can I use
AuthService
inside ofExpertService
?The error :(
Thank you in advance and I hope you can help me!
The text was updated successfully, but these errors were encountered: