zonedSchedule method

Future<void> zonedSchedule(
  1. int id,
  2. String title,
  3. String body,
  4. TZDateTime scheduledDate,
  5. MacOSNotificationDetails notificationDetails,
  6. {String payload,
  7. DateTimeComponents matchDateTimeComponents}

Schedules a notification to be shown at the specified date and time relative to a specific time zone.


Future<void> zonedSchedule(
  int id,
  String title,
  String body,
  TZDateTime scheduledDate,
  MacOSNotificationDetails notificationDetails, {
  String payload,
  DateTimeComponents matchDateTimeComponents,
}) async {
  final Map<String, Object> serializedPlatformSpecifics =
      notificationDetails?.toMap() ?? <String, Object>{};
  await _channel.invokeMethod(
      <String, Object>{
        'id': id,
        'title': title,
        'body': body,
        'platformSpecifics': serializedPlatformSpecifics,
        'payload': payload ?? '',
        ..addAll(matchDateTimeComponents == null
            ? <String, Object>{}
            : <String, Object>{
                'matchDateTimeComponents': matchDateTimeComponents.index