showWeeklyAtDayAndTime method

  1. @Deprecated('Deprecated due to problems with time zones. Use zonedSchedule instead.')
Future<void> showWeeklyAtDayAndTime(
  1. int id,
  2. String? title,
  3. String? body,
  4. Day day,
  5. Time notificationTime,
  6. AndroidNotificationDetails? notificationDetails, {
  7. String? payload,
})

Shows a notification on weekly interval at the specified day and time.

Implementation

@Deprecated(
    'Deprecated due to problems with time zones. Use zonedSchedule instead.')
Future<void> showWeeklyAtDayAndTime(
  int id,
  String? title,
  String? body,
  Day day,
  Time notificationTime,
  AndroidNotificationDetails? notificationDetails, {
  String? payload,
}) async {
  validateId(id);

  await _channel.invokeMethod('showWeeklyAtDayAndTime', <String, Object?>{
    'id': id,
    'title': title,
    'body': body,
    'calledAt': clock.now().millisecondsSinceEpoch,
    'repeatInterval': RepeatInterval.weekly.index,
    'repeatTime': notificationTime.toMap(),
    'day': day.value,
    'platformSpecifics': notificationDetails?.toMap(),
    'payload': payload ?? ''
  });
}