The following error is thrown when I tried to run a windows application
[ERROR:flutter/runtime/dart_vm_initializer.cc(41)] Unhandled Exception: Unsupported operation: DefaultFirebaseOptions have not been configured for windows - you can reconfigure this by running the FlutterFire CLI again.
#0 DefaultFirebaseOptions.currentPlatform (package:user_authentication/firebase_options.dart:36:9)
#1 main (package:user_authentication/main.dart:11:37)
#2 _runMain.<anonymous closure> (dart:ui/hooks.dart:134:23)
#3 _delayEntrypointInvocation.<anonymous closure> (dart:isolate-patch/isolate_patch.dart:297:19)
#4 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:192:12)
I even tried to run flutterfire configure command from the root directory
Flutterfire cli not showing windows as an option for platform to support
i Found 2 Firebase projects. Selecting project my-cool-firebase.
? Which platforms should your configuration support (use arrow keys & space to select)? ›
✔ android
ios
macos
✔ web
2
Answers
I had the same issue. I am assuming when you run
flutterfire configure
command, it isn’t showing windows & linux option. For some reasondart pub global activate flutterfire_cli
this command wasn’t working for me. What solved my issue isI Added
flutterfire_cli
package manually to pubspec.yaml usingflutter pub add flutterfire_cli
Then I Run
dart pub global activate flutterfire_cli
after you done those two steps,
flutterfire configure --project=<your-project-name>
should show windows and linux option.try to run
flutter pub add firebase_core_desktop
and then
flutterfire configure