Hi guys first time here on stack overflow.
I am currently building an app using flutter with firebase as the backend.
My target platforms are Windows and android
The android app builds fine
The windows app throws :
ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: PlatformException(channel-error, Unable to establish connection on channel., null, null)
this only happens when I use :
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
I have also tried :
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp(
options: const FirebaseOptions(
apiKey: "myapi",
appId: "appid",
messagingSenderId: "senderid",
projectId: "projectid",
storageBucket: "buckedid",
databaseURL: 'databaseurl',
));
As stated this works fine on android but not windows
I have the latest dependencies for Firebase
I have tried flutter pub outdated and it returns no Firebase dependencies
I have tried flutter pub upgrade
I have tried flutter clear