To integrate SSL Pinning into a Flutter application, we’ll adopt the Certificate-based pinning method. Let’s explore this approach in detail. To bring this to life, we’ll integrate the RESTful API provided byrestcountries.cominto our sample application. Step 1:Download the SSL certificate fr...
From the root project, run the command flutter pub add firebase_messaging to add the cloud messaging plugin. You then need to register the device and get an FCM token to send notifications to the user. After that, you can handle notifications received in the foreground as well as in the ...
{ WidgetsFlutterBinding.ensureInitialized(); await Firebase.initializeApp(); FirebaseMessaging messaging = FirebaseMessaging.instance; //Get FCM token final fcmToken = await messaging.getToken(); FirebaseMessaging.onMessage.listen((RemoteMessage message) { print('Got a message whilst in the foreground...