showSegmentifyNotification function
Implementation
Future<void> showSegmentifyNotification(
String title, String body, String data) async {
final randomInt = Random().nextInt(100);
var androidDetails = const AndroidNotificationDetails(
pushAndroidChannelId, pushAndroidChannelName,
channelDescription: pushAndroidChannelDescription,
importance: Importance.max,
priority: Priority.high,
showWhen: true);
var iOSDetails = const DarwinNotificationDetails();
var generalNotificationDetails =
NotificationDetails(android: androidDetails, iOS: iOSDetails);
await flutterLocalNotificationsPlugin.show(
randomInt, // Notification ID
title, // Notification Title
body, // Notification Body
generalNotificationDetails, // Notification Details
payload: data // Payload
);
}