Previously I getting this No Firebase App '[DEFAULT]' has been created error when trying to copy the code from my previous Flutter project, which required me to import firebase_core
and run Firebase.initializeApp()
before runApp()
.
Unfortunately I getting below errors when trying to properly follow the installation instruction here https://pub.dev/packages/firebase_core, caused by unresolvable references on these two lines
import 'package:firebase_core_example/firebase_config.dart'
FirebaseApp app = await Firebase.initializeApp(options : DefaultFirebaseConfig.platformOptions)
So I wonder where that firebase_core_example
and it's DefaultFirebaseConfig
class actually came from because I can't find anywhere from pub.dev. Surely the default settings should be allowed because all the required informations has already been included in android/app/google-services.json
file. I don't think I need to hardcode it again in Dart file.