NotificationAndroidCrontab constructor

NotificationAndroidCrontab({
  1. DateTime? initialDateTime,
  2. DateTime? expirationDateTime,
  3. List<DateTime>? preciseSchedules,
  4. String? crontabExpression,
  5. String? timeZone,
  6. bool allowWhileIdle = false,
  7. bool repeats = false,
  8. bool preciseAlarm = true,
})

Constructs a NotificationAndroidCrontab with various crontab-based scheduling options.

initialDateTime: The initial date limit for the schedule's validity. expirationDateTime: The final date limit for the schedule's validity. preciseSchedules: A list of specific dates for scheduling notifications. crontabExpression: A crontab expression defining the repetition rule with second precision. timeZone: Specifies the time zone identifier for the schedule. allowWhileIdle: Allows the notification to display even when the device is in low battery mode. repeats: Determines if the notification will be repeated. preciseAlarm: Requires maximum precision for scheduling notifications, which may use more battery.

Implementation

NotificationAndroidCrontab(
    {DateTime? initialDateTime,
    DateTime? expirationDateTime,
    List<DateTime>? preciseSchedules,
    String? crontabExpression,
    String? timeZone,
    super.allowWhileIdle,
    super.repeats,
    super.preciseAlarm = true})
    : _initialDateTime = AwesomeAssertUtils.getValueOrDefault<DateTime>(
          NOTIFICATION_INITIAL_DATE_TIME, initialDateTime),
      _expirationDateTime = AwesomeAssertUtils.getValueOrDefault<DateTime>(
          NOTIFICATION_EXPIRATION_DATE_TIME, expirationDateTime),
      _preciseSchedules =
          AwesomeAssertUtils.getValueOrDefault<List<DateTime>>(
              NOTIFICATION_PRECISE_SCHEDULES, preciseSchedules),
      _crontabExpression = AwesomeAssertUtils.getValueOrDefault<String>(
          NOTIFICATION_CRONTAB_EXPRESSION, crontabExpression),
      super(
          timeZone: timeZone ?? AwesomeNotifications.localTimeZoneIdentifier);