ScheduleNotifications class

The Notification feature for the phone.

Mixed in types

Constructors

ScheduleNotifications(String channelId, String channelName, String channelDescription, {String? appIcon, TZDateTime? schedule, String? title, String? body, String? payload, bool? androidAllowWhileIdle, String? icon, Importance? importance, Priority? priority, StyleInformation? styleInformation, bool? playSound, AndroidNotificationSound? sound, bool? enableVibration, List<int>? vibrationPattern, String? groupKey, bool? setAsGroupSummary, GroupAlertBehavior? groupAlertBehavior, bool? autoCancel, bool? ongoing, Color? color, AndroidBitmap<Object>? largeIcon, bool? onlyAlertOnce, bool? showWhen, bool? usesChronometer, bool? channelShowBadge, bool? showProgress, int? maxProgress, int? progress, bool? indeterminate, AndroidNotificationChannelAction? channelAction, bool? enableLights, Color? ledColor, int? ledOnMs, int? ledOffMs, String? ticker, NotificationVisibility? visibility, int? timeoutAfter, String? category, bool? fullScreenIntent, String? shortcutId, Int32List? additionalFlags, String? subText, String? tag, RepeatInterval? repeatInterval, Day? day, SelectNotificationCallback? onSelectNotification, bool? requestAlertPermission, bool? requestSoundPermission, bool? requestBadgePermission, bool? defaultPresentAlert, bool? defaultPresentSound, bool? defaultPresentBadge, DidReceiveLocalNotificationCallback? onDidReceiveLocalNotification, bool? presentAlert, bool? presentSound, bool? presentBadge, String? soundFile, int? badgeNumber, List<IOSNotificationAttachment>? attachments, String? subtitle, String? threadIdentifier})
Pass in all the possible settings for your App's Notificatoin feature.

Properties

channelDescription String
The channel's description. Required for Android 8.0+.
final
channelId String
The channel's id. Required for Android 8.0+.
final
channelName String
The channel's name. Required for Android 8.0+.
final
errorMsg String
Simply display the error.
no setterinherited
hasError bool
Indicate if the app is 'in error.'
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
inError bool
Indicate if app is 'in error.'
no setterinherited
initialized bool?
A flag indicating Notification's is properly initialized.
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancel(int? id, {String? tag}) Future<void>
Cancel a specific notification.
cancelAll() Future<void>
Cancel all Notifications.
dispose() → void
Supply a consistent API requiring the user to implement the dispose() function.
getError([dynamic error]) Exception?
Return the 'last' error if any.
inherited
getNotificationAppLaunchDetails() Future<NotificationAppLaunchDetails?>
Returns info on if a notification created from this plugin had been used to launch the application.
init({String? appIcon, DateTime? schedule, String? title, String? body, String? payload, bool? androidAllowWhileIdle, String? icon, Importance? importance, Priority? priority, StyleInformation? styleInformation, bool? playSound, AndroidNotificationSound? sound, bool? enableVibration, List<int>? vibrationPattern, String? groupKey, bool? setAsGroupSummary, GroupAlertBehavior? groupAlertBehavior, bool? autoCancel, bool? ongoing, Color? color, AndroidBitmap<Object>? largeIcon, bool? onlyAlertOnce, bool? showWhen, int? when, bool? usesChronometer, bool? channelShowBadge, bool? showProgress, int? maxProgress, int? progress, bool? indeterminate, AndroidNotificationChannelAction? channelAction, bool? enableLights, Color? ledColor, int? ledOnMs, int? ledOffMs, String? ticker, NotificationVisibility? visibility, int? timeoutAfter, String? category, bool? fullScreenIntent, String? shortcutId, Int32List? additionalFlags, String? subText, String? tag, RepeatInterval? repeatInterval, Day? day, Time? notificationTime, SelectNotificationCallback? onSelectNotification, bool? requestAlertPermission, bool? requestSoundPermission, bool? requestBadgePermission, bool? defaultPresentAlert, bool? defaultPresentSound, bool? defaultPresentBadge, DidReceiveLocalNotificationCallback? onDidReceiveLocalNotification, bool? presentAlert, bool? presentSound, bool? presentBadge, String? soundFile, int? badgeNumber, List<IOSNotificationAttachment>? attachments, String? subtitle, String? threadIdentifier}) Future<bool?>
Initialize the App's Notification system.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pendingNotificationRequests() Future<List<PendingNotificationRequest>>
Returns a list of notifications pending to be delivered/shown.
periodicallyShow(RepeatInterval? repeatInterval, {int? id, String? title, String? body, String? payload, bool? androidAllowWhileIdle, String? icon, Importance? importance, Priority? priority, StyleInformation? styleInformation, bool? playSound, AndroidNotificationSound? sound, bool? enableVibration, List<int>? vibrationPattern, String? groupKey, bool? setAsGroupSummary, GroupAlertBehavior? groupAlertBehavior, bool? autoCancel, bool? ongoing, Color? color, AndroidBitmap<Object>? largeIcon, bool? onlyAlertOnce, bool? showWhen, int? when, bool? usesChronometer, bool? channelShowBadge, bool? showProgress, int? maxProgress, int? progress, bool? indeterminate, AndroidNotificationChannelAction? channelAction, bool? enableLights, Color? ledColor, int? ledOnMs, int? ledOffMs, String? ticker, NotificationVisibility? visibility, int? timeoutAfter, String? category, bool? fullScreenIntent, String? shortcutId, Int32List? additionalFlags, String? subText, String? tag, bool? presentAlert, bool? presentSound, bool? presentBadge, String? soundFile, int? badgeNumber, List<IOSNotificationAttachment>? attachments, List<MacOSNotificationAttachment>? macAttachments, String? subtitle, String? threadIdentifier}) int
Show a Notification periodically.
resolveIOSImplementation({bool alert = true, bool badge = true, bool sound = true}) Future<bool>
Returns the underlying platform-specific implementation of given generic type T, which must be a concrete subclass of FlutterLocalNotificationsPlatform.
schedule(TZDateTime? schedule, {int? id, String? title, String? body, String? payload, bool? androidAllowWhileIdle, UILocalNotificationDateInterpretation? uiLocalNotificationDateInterpretation, DateTimeComponents? matchDateTimeComponents, String? icon, Importance? importance, Priority? priority, StyleInformation? styleInformation, bool? playSound, AndroidNotificationSound? sound, bool? enableVibration, List<int>? vibrationPattern, String? groupKey, bool? setAsGroupSummary, GroupAlertBehavior? groupAlertBehavior, bool? autoCancel, bool? ongoing, Color? color, AndroidBitmap<Object>? largeIcon, bool? onlyAlertOnce, bool? showWhen, int? when, bool? channelShowBadge, bool? showProgress, int? maxProgress, int? progress, bool? indeterminate, AndroidNotificationChannelAction? channelAction, bool? enableLights, Color? ledColor, int? ledOnMs, int? ledOffMs, String? ticker, NotificationVisibility? visibility, int? timeoutAfter, String? category, bool? fullScreenIntent, String? shortcutId, Int32List? additionalFlags, String? subText, String? tag, bool? presentAlert, bool? presentSound, bool? presentBadge, String? soundFile, int? badgeNumber, List<IOSNotificationAttachment>? attachments, List<MacOSNotificationAttachment>? macAttachments, String? subtitle, String? threadIdentifier}) int
To display a scheduled Notification.
show({int? id, String? title, String? body, String? payload, bool? androidAllowWhileIdle, String? icon, Importance? importance, Priority? priority, StyleInformation? styleInformation, bool? playSound, AndroidNotificationSound? sound, bool? enableVibration, List<int>? vibrationPattern, String? groupKey, bool? setAsGroupSummary, GroupAlertBehavior? groupAlertBehavior, bool? autoCancel, bool? ongoing, Color? color, AndroidBitmap<Object>? largeIcon, bool? onlyAlertOnce, bool? showWhen, int? when, bool? usesChronometer, bool? channelShowBadge, bool? showProgress, int? maxProgress, int? progress, bool? indeterminate, AndroidNotificationChannelAction? channelAction, bool? enableLights, Color? ledColor, int? ledOnMs, int? ledOffMs, String? ticker, NotificationVisibility? visibility, int? timeoutAfter, String? category, bool? fullScreenIntent, String? shortcutId, Int32List? additionalFlags, String? subText, String? tag, bool? presentAlert, bool? presentSound, bool? presentBadge, String? soundFile, int? badgeNumber, List<IOSNotificationAttachment>? attachments, List<MacOSNotificationAttachment>? macAttachments, String? subtitle, String? threadIdentifier}) int
Show the Notification.
showDailyAtTime(TZDateTime? schedule, {int? id, String? title, String? body, String? payload, bool? androidAllowWhileIdle, UILocalNotificationDateInterpretation? uiLocalNotificationDateInterpretation, DateTimeComponents? matchDateTimeComponents, String? icon, Importance? importance, Priority? priority, StyleInformation? styleInformation, bool? playSound, AndroidNotificationSound? sound, bool? enableVibration, List<int>? vibrationPattern, String? groupKey, bool? setAsGroupSummary, GroupAlertBehavior? groupAlertBehavior, bool? autoCancel, bool? ongoing, Color? color, AndroidBitmap<Object>? largeIcon, bool? onlyAlertOnce, bool? showWhen, int? when, bool? usesChronometer, bool? channelShowBadge, bool? showProgress, int? maxProgress, int? progress, bool? indeterminate, AndroidNotificationChannelAction? channelAction, bool? enableLights, Color? ledColor, int? ledOnMs, int? ledOffMs, String? ticker, NotificationVisibility? visibility, int? timeoutAfter, String? category, bool? fullScreenIntent, String? shortcutId, Int32List? additionalFlags, String? subText, String? tag, bool? presentAlert, bool? presentSound, bool? presentBadge, String? soundFile, int? badgeNumber, List<IOSNotificationAttachment>? attachments, List<MacOSNotificationAttachment>? macAttachments, String? subtitle, String? threadIdentifier}) int
Show a Notification daily at a specific time.
showWeeklyAtDayAndTime(Day? day, TZDateTime? schedule, {int? id, String? title, String? body, String? payload, bool? androidAllowWhileIdle, NotificationDetails? notificationDetails, UILocalNotificationDateInterpretation? uiLocalNotificationDateInterpretation, DateTimeComponents? matchDateTimeComponents, String? icon, Importance? importance, Priority? priority, StyleInformation? styleInformation, bool? playSound, AndroidNotificationSound? sound, bool? enableVibration, List<int>? vibrationPattern, String? groupKey, bool? setAsGroupSummary, GroupAlertBehavior? groupAlertBehavior, bool? autoCancel, bool? ongoing, Color? color, AndroidBitmap<Object>? largeIcon, bool? onlyAlertOnce, bool? showWhen, int? when, bool? usesChronometer, bool? channelShowBadge, bool? showProgress, int? maxProgress, int? progress, bool? indeterminate, AndroidNotificationChannelAction? channelAction, bool? enableLights, Color? ledColor, int? ledOnMs, int? ledOffMs, String? ticker, NotificationVisibility? visibility, int? timeoutAfter, String? category, bool? fullScreenIntent, String? shortcutId, Int32List? additionalFlags, String? subText, String? tag, bool? presentAlert, bool? presentSound, bool? presentBadge, String? soundFile, int? badgeNumber, List<IOSNotificationAttachment>? attachments, List<MacOSNotificationAttachment>? macAttachments, String? subtitle, String? threadIdentifier}) int
Show a Notifications weekly on a specific day and time.
toString() String
A string representation of this object.
inherited
zonedSchedule(TZDateTime? schedule, {int? id, String? title, String? body, String? payload, bool? androidAllowWhileIdle, UILocalNotificationDateInterpretation? uiLocalNotificationDateInterpretation, DateTimeComponents? matchDateTimeComponents, String? icon, Importance? importance, Priority? priority, StyleInformation? styleInformation, bool? playSound, AndroidNotificationSound? sound, bool? enableVibration, List<int>? vibrationPattern, String? groupKey, bool? setAsGroupSummary, GroupAlertBehavior? groupAlertBehavior, bool? autoCancel, bool? ongoing, Color? color, AndroidBitmap<Object>? largeIcon, bool? onlyAlertOnce, bool? showWhen, int? when, bool? usesChronometer, bool? channelShowBadge, bool? showProgress, int? maxProgress, int? progress, bool? indeterminate, AndroidNotificationChannelAction? channelAction, bool? enableLights, Color? ledColor, int? ledOnMs, int? ledOffMs, String? ticker, NotificationVisibility? visibility, int? timeoutAfter, String? category, bool? fullScreenIntent, String? shortcutId, Int32List? additionalFlags, String? subText, String? tag, bool? presentAlert, bool? presentSound, bool? presentBadge, String? soundFile, int? badgeNumber, List<IOSNotificationAttachment>? attachments, List<MacOSNotificationAttachment>? macAttachments, String? subtitle, String? threadIdentifier}) int
Displays a scheduled Notification.

Operators

operator ==(Object other) bool
The equality operator.
inherited