showLocalNotificationAfterSeconds method
Future<void>
showLocalNotificationAfterSeconds(
{ - required int seconds,
- required int id,
- required String title,
- required String body,
- required String payload,
})
Implementation
Future<void> showLocalNotificationAfterSeconds({
required int seconds,
required int id,
required String title,
required String body,
required String payload,
}) async {
final platformChannelSpecifics = await _notificationDetails();
await _localNotifications.zonedSchedule(
id,
title,
body,
tz.TZDateTime.now(tz.local).add(Duration(seconds: seconds)),
platformChannelSpecifics,
uiLocalNotificationDateInterpretation:
UILocalNotificationDateInterpretation.absoluteTime,
androidScheduleMode: AndroidScheduleMode.inexactAllowWhileIdle);
}