showDailyAtTime method

  1. @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(
  1. int id,
  2. String? title,
  3. String? body,
  4. Time notificationTime,
  5. NotificationDetails notificationDetails, {
  6. String? payload,
})

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();
  }
}