sendLocalNotification method
Implementation
Future<void> sendLocalNotification({
required String title,
required String body,
required Map<String, dynamic> payload,
}) async {
await fn
.show(
0,
title,
body,
NotificationDetails(
android: const AndroidNotificationDetails(
'notifications',
'Notifications',
channelDescription: 'Configure Notifications in Resilient',
importance: Importance.max,
priority: Priority.high,
),
iOS: DarwinNotificationDetails(
interruptionLevel: InterruptionLevel.timeSensitive,
),
),
payload: jsonEncode(payload),
)
.then((i) => verbose("Sent Local Notification: $payload"));
}