Here you may follow the tips to desgin Flutter PHP and Firebase push notification. In this assignment you need to desgin a diagram and write pseudo-code. Once you are done you may do the coding and after that you need to do Postman test.
Find me on Twitter @dbestech. You may also find me on Udemy if you are taking this video and audio chat app tutorial.
Hopefully this would help you understand how notification works in real world app.
Prerequisite
Before you start you need to make sure you have installed Firebase Admin SDK and it's integrated with PHP Laravel framework.
FlutterLocalNotificationPlugin
is installedfirebase_messaging
plugin is installedFirebaseMessasingHanlder
)equest permission
initialize()
) in the classFirebaseMessaging.onMessage.listen((RemoteMessage message)){}
await FirebaseMessaging.instance.setForegroundNotificationPresentationOptions(alert: true, badge: true, sound: true);
@pragma('vm:entry-point')
static Future<void> firebaseMessagingBackground(RemoteMessage message) async {
await Firebase.initializeApp(options: DefaultFirebaseOptions.currentPlatform,);
}
initialize()
method from main.dart from main()
functionSteps