When I run my app I get the following:
FirebaseException ([core/not-initialized] Firebase has not been correctly initialized. Have you added the "google-services.json" file to the project? View the Android Installation documentation for more information: https://firebaseextended.github.io/flutterfire/docs/installation/android)
I am 100% certain that I copy and pasted my "google-services.json" file in the correct directory:
android > app
EDIT: This is my main.dart looks like*******************
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
// Create the initialization Future outside of `build`:
final Future<FirebaseApp> _initialization = Firebase.initializeApp();
// This widget is the root of your application.
@override
Widget build(BuildContext context) {
return FutureBuilder(
// Initialize FlutterFire:
future: _initialization,
builder: (context, snapshot) {
// Check for errors
if (snapshot.hasError) {
return Center(
child: Text("Someting went Worng"),
);
}
// Once complete, show your application
if (snapshot.connectionState == ConnectionState.done) {
return StreamProvider<SignedInUser>.value(
value: AuthService().user,
child: MaterialApp(
home: Wrapper(),
),
);
}
// Otherwise, show something whilst waiting for initialization to complete
return CircularProgressIndicator();
},
);
}
}
please help!
Thank you in advance!