Send Push Notification Using @onesignalofficial in @FlutterFlow App
In this video, we will learn how to integrate OneSignal push notifications in FlutterFlow using custom code. We will go through the process of setting up a OneSignal account, creating a OneSignal app, uploading the Firebase service account JSON file, and obtaining the OneSignal app ID. Then, we will demonstrate how to add the necessary custom code in FlutterFlow and modify the main.dart file. Finally, we will test the functionality by sending notifications to a real device and exploring different types of notifications, including text, image, and in-app notifications.
Support Channel By Joining Patreon and get Access to Exclusic Content
/ flutterflowvip
code - -
import 'package:onesignal_flutter/onesignal_flutter.dart';
Future onesignal() async {
OneSignal.Debug.setLogLevel(OSLogLevel.verbose);
OneSignal.initialize("990edcee-78e1-4017-b154-cae276866efd");
// The promptForPushNotificationsWithUserResponse function will show the iOS or Android push notification prompt. We recommend removing the following code and instead using an In-App Message to prompt for notification permission
OneSignal.Notifications.requestPermission(true);
}
// Set your action name, define your arguments and return parameter,
// and then add the boilerplate code using the button on the right!
Code --
Thanks for watching! If you found this tutorial helpful, please like the video and consider subscribing to our channel for more FlutterFlow tutorials and updates. If you have any questions or suggestions, feel free to leave a comment below. Keep building awesome apps.