showDailyAtTime method
- @Deprecated('Deprecated due to problems with time zones. Use zonedSchedule instead ' 'by passing a date in the future with the same time and pass ' 'DateTimeComponents.matchTime as the value of the ' 'matchDateTimeComponents parameter.')
Shows a notification on a daily interval at the specified time.
Implementation
@Deprecated('Deprecated due to problems with time zones. Use zonedSchedule instead '
'by passing a date in the future with the same time and pass '
'DateTimeComponents.matchTime as the value of the '
'matchDateTimeComponents parameter.')
Future<void> showDailyAtTime(
int id,
String? title,
String? body,
Time notificationTime,
NotificationDetails notificationDetails, {
String? payload,
}) async {
if (kIsWeb) {
return;
}
if (defaultTargetPlatform == TargetPlatform.android) {
await resolvePlatformSpecificImplementation<AndroidFlutterLocalNotificationsPlugin>()
?.showDailyAtTime(id, title, body, notificationTime, notificationDetails.android, payload: payload);
} else if (defaultTargetPlatform == TargetPlatform.iOS) {
await resolvePlatformSpecificImplementation<IOSFlutterLocalNotificationsPlugin>()
?.showDailyAtTime(id, title, body, notificationTime, notificationDetails.iOS, payload: payload);
} else if (defaultTargetPlatform == TargetPlatform.macOS) {
throw UnimplementedError();
}
}