schedule method

  1. @Deprecated('Deprecated due to problems with time zones. Use zonedSchedule instead.')
Future<void> schedule(
  1. int id,
  2. String title,
  3. String body,
  4. DateTime scheduledDate,
  5. IOSNotificationDetails notificationDetails,
  6. {String payload}
)
@Deprecated('Deprecated due to problems with time zones. Use zonedSchedule instead.')

Schedules a notification to be shown at the specified date and time with an optional payload that is passed through when a notification is tapped.

Implementation

@Deprecated(
    'Deprecated due to problems with time zones. Use zonedSchedule instead.')
Future<void> schedule(
  int id,
  String title,
  String body,
  DateTime scheduledDate,
  IOSNotificationDetails notificationDetails, {
  String payload,
}) async {
  validateId(id);
  await _channel.invokeMethod('schedule', <String, Object>{
    'id': id,
    'title': title,
    'body': body,
    'millisecondsSinceEpoch': scheduledDate.millisecondsSinceEpoch,
    'platformSpecifics': notificationDetails?.toMap(),
    'payload': payload ?? ''
  });
}