Courses / Add Push Notifications to a Flutter App with Firebase
Lesson 5 of 9

Install Flutter FCM Packages

▶

Video by Bohdan Samusko on YouTube · 17 min. We did not make this video and we do not host it — watching it here still counts as a view for the creator.

Add firebase_core and firebase_messaging to pubspec.yaml. The tutorial shows running flutter pub get and initializing Firebase in main.dart. A frequent beginner error is calling Firebase.initializeApp() after using any Firebase service, which throws a runtime exception.

Make sure to import the packages with the correct null‑safe syntax. This lesson prepares the Dart side for token retrieval and message handling.

Start learning free

Sign in with your email, Google or GitHub. No password to remember. The same account carries your progress, your certificates and anything else you do with Nexgino later.

Sign in to continue

It takes about fifteen seconds.