schedule method
- @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,
DarwinNotificationDetails? 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 ?? ''
});
}