Solved [core/no-app] No Firebase App '[DEFAULT]' has been created - call Firebase.initializeApp()
While using Firebase services in Flutter, you may get "[core/no-app] No Firebase App'[DEFAULT]' has been created - call Firebase.initalizeApp()". Error in flutter. This error is caused when you use any Firebase servies such as Cloud Messaging, Firestore without initializing Firebase core.

This cause of this error is you might not have initialized firebase before using firebase service.
How to solve this error?
To solve this error, add firebase core Flutter package in your project by adding the following lines in pubspec.yaml file:
dependencies:
flutter:
sdk: flutter
firebase_core: ^2.15.0
Now in main() method of main.dart file, initialize Firebase like below before using any Firebase services:
import 'package:firebase_core/firebase_core.dart';
void main() async {
WidgetsFlutterBinding.ensureInitialized();
await Firebase.initializeApp();
//initilization of Firebase app
// other Firebase service initialization
runApp(MyApp());
}
Adding WidgetsFlutterBinding.ensureInitialized();
and await Firebase.initializeApp(); with async will solve the problem. Thank you