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/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Binding has not yet been initialized.
The "instance" getter on the ServicesBinding binding mixin is only available once that binding has been initialized.
Typically, this is done by calling "WidgetsFlutterBinding.ensureInitialized()" or "runApp()" (the latter calls the former). Typically this call is done in the "void main()" method. The "ensureInitialized" method is idempotent; calling it multiple times is not harmful. After calling that method, the "instance" getter will return the binding.
In a test, one can call "TestWidgetsFlutterBinding.ensureInitialized()" as the first line in the test's "main()" method to initialize the binding.
If ServicesBinding is a custom binding mixin, there must also be a custom binding class, like WidgetsFlutterBinding, but that mixes in the selected binding, and that is the class that must be constructed before using the "instance" getter.
#0 BindingBase.checkInstance.<anonymous closure> (package:flutter/src/foundation/binding.dart:287:9)
#1 BindingBase.checkInstance (package:flutter/src/foundation/binding.dart:369:6)
#2 ServicesBinding.instance (package:flutter/src/services/binding.dart:55:54)
#3 _findBinaryMessenger (package:flutter/src/services/platform_channel.dart:136:25)
#4 BasicMessageChannel.binaryMessenger (package:flutter/src/services/platform_channel.dart:183:56)
#5 BasicMessageChannel.send (package:flutter/src/services/platform_channel.dart:197:38)
#6 UserDefaultsApi.getAll (package:shared_preferences_foundation/messages.g.dart:115:52)
#7 SharedPreferencesFoundation.getAll (package:shared_preferences_foundation/shared_preferences_foundation.dart:46:53)
#8 SharedPreferences._getSharedPreferencesMap (package:shared_preferences/shared_preferences.dart:164:57)
#9 SharedPreferences.getInstance (package:shared_preferences/shared_preferences.dart:33:19)
#10 AppManager.initAppData (package:chat_desk/core/io/app_manager.dart:7:43)
#11 main (package:chat_desk/main.dart:27:20)
#12 _runMain.<anonymous closure> (dart:ui/hooks.dart:131:23)
#13 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
#14 _RawReceivePort._handleMessage (dart:isolate-patch/isolate_patch.dart:192:26)
Using the MacBook M1 chip
Flutter 3.7.6 version
An error occurs when running on a MacOS system
The text was updated successfully, but these errors were encountered:
@Alex-Alive
The recent commit should resolve this issue, if not you may reopen this issue!
More Bugs are likely to encounter cause' this is in the phase of development. Thanks for reporting!
Using the MacBook M1 chip
Flutter 3.7.6 version
An error occurs when running on a MacOS system
The text was updated successfully, but these errors were encountered: