NotificationCalendar class
Constructors
-
NotificationCalendar({int? era, int? year, int? month, int? day, int? hour, int? minute, int? second, int? millisecond, int? weekday, int? weekOfMonth, int? weekOfYear, String? timeZone, bool allowWhileIdle = false, bool preciseAlarm = false, 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)
-
NotificationCalendar.fromDate({required DateTime date, bool allowWhileIdle = false, bool repeats = false, bool preciseAlarm = false})
-
Initialize a notification schedule calendar based on a date object
Properties
-
allowWhileIdle
↔ bool
-
Displays the notification, even when the device is low battery
getter/setter pairinherited
-
createdDate
→ String?
-
Reference
no setterinherited
-
day
↔ int?
-
Field number for get and set indicating the day of the month (1-31).
getter/setter pair
-
era
↔ int?
-
Field number for get and set indicating the era, e.g., AD or BC in the Julian calendar
getter/setter pair
-
hashCode
→ int
-
The hash code for this object.
no setterinherited
-
hour
↔ int?
-
Field number for get and set indicating the hour of the day (0-23).
getter/setter pair
-
millisecond
↔ int?
-
Field number for get and set indicating the millisecond within the second.
getter/setter pair
-
minute
↔ int?
-
Field number for get and set indicating the minute within the hour (0-59).
getter/setter pair
-
month
↔ int?
-
Field number for get and set indicating the month of the year (1-12).
getter/setter pair
-
preciseAlarm
↔ bool
-
Displays the notification at precise date, even when the device is low battery. Requires explicity permission in Android 12 and beyond.
getter/setter pairinherited
-
repeats
↔ bool
-
Specify false to deliver the notification one time. Specify true to reschedule the notification request each time the notification is delivered.
getter/setter pairinherited
-
runtimeType
→ Type
-
A representation of the runtime type of the object.
no setterinherited
-
second
↔ int?
-
Field number for get and set indicating the second within the minute (0-59).
getter/setter pair
-
timeZone
↔ String
-
Full time zone identifier to schedule a notification, in english (ex: America/Sao_Paulo, America/New_York, Europe/Helsinki or GMT-07:00)
getter/setter pairinherited
-
weekday
↔ int?
-
Field number for get and set indicating the day of the week (1 = Monday).
getter/setter pair
-
weekOfMonth
↔ int?
-
Field number for get and set indicating the count of weeks of the month.
getter/setter pair
-
weekOfYear
↔ int?
-
Field number for get and set indicating the weeks of the year.
getter/setter pair
-
year
↔ int?
-
Field number for get and set indicating the year.
getter/setter pair