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. IOSNotificationDetails notificationDetails,
  7. {String payload}
)
@Deprecated('Deprecated due to problems with time zones. Use zonedSchedule instead.')

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,
  IOSNotificationDetails notificationDetails, {
  String payload,
}) async {
  validateId(id);
  await _channel.invokeMethod('showWeeklyAtDayAndTime', <String, Object>{
    'id': id,
    'title': title,
    'body': body,
    'calledAt': DateTime.now().millisecondsSinceEpoch,
    'repeatInterval': RepeatInterval.weekly.index,
    'repeatTime': notificationTime.toMap(),
    'day': day.value,
    'platformSpecifics': notificationDetails?.toMap(),
    'payload': payload ?? ''
  });
}