NotificationCalendar constructor

NotificationCalendar({
  1. int? era,
  2. int? year,
  3. int? month,
  4. int? day,
  5. int? hour,
  6. int? minute,
  7. int? second,
  8. int? millisecond,
  9. int? weekday,
  10. int? weekOfMonth,
  11. int? weekOfYear,
  12. String? timeZone,
  13. bool allowWhileIdle = false,
  14. bool preciseAlarm = true,
  15. bool repeats = false,
})

Notification Schedule based on calendar components. At least one date parameter is required. era Schedule era condition year Schedule year condition month Schedule month condition day Schedule day condition hour Schedule hour condition minute Schedule minute condition second Schedule second condition weekday Schedule weekday condition weekOfMonth Schedule weekOfMonth condition weekOfMonth Schedule weekOfMonth condition weekOfYear Schedule weekOfYear condition allowWhileIdle Displays the notification, even when the device is low battery repeats Defines if the notification should play only once or keeps repeating preciseAlarm Requires maximum precision to schedule notifications at exact time, but may use more battery. Requires the explicit user consent for Android 12 and beyond. timeZone time zone identifier as reference of this schedule date. (https://en.wikipedia.org/wiki/List_of_tz_database_time_zones)

Implementation

NotificationCalendar({
  this.era,
  this.year,
  this.month,
  this.day,
  this.hour,
  this.minute,
  this.second,
  this.millisecond,
  this.weekday,
  this.weekOfMonth,
  this.weekOfYear,
  String? timeZone,
  super.allowWhileIdle,
  super.preciseAlarm = true,
  super.repeats,
}) : super(
          timeZone:
              timeZone ?? AwesomeNotifications.localTimeZoneIdentifier) {
  if (weekOfMonth != null) {
    throw UnimplementedError("weekOfMonth is not fully implemented yet");
  }
}