AndroidFlutterLocalNotificationsPlugin class
Android implementation of the local notifications plugin.
- Inheritance
-
- Object
- PlatformInterface
- FlutterLocalNotificationsPlatform
- AndroidFlutterLocalNotificationsPlugin
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
cancel(
int id, {String? tag}) → Future< void> - Cancel/remove the notification with the specified id.
-
cancelAll(
) → Future< void> -
Cancels/removes all notifications. This applies to notifications that have been scheduled and those that have already been presented.
inherited
-
createNotificationChannel(
AndroidNotificationChannel notificationChannel) → Future< void> - Creates a notification channel.
-
createNotificationChannelGroup(
AndroidNotificationChannelGroup notificationChannelGroup) → Future< void> - Creates a notification channel group.
-
deleteNotificationChannel(
String channelId) → Future< void> -
Deletes the notification channel with the specified
channelId
. -
deleteNotificationChannelGroup(
String groupId) → Future< void> -
Deletes the notification channel group with the specified
groupId
as well as all of the channels belonging to the group. -
getActiveNotifications(
) → Future< List< ActiveNotification> ?> - Returns the list of active notifications shown by the application that haven't been dismissed/removed.
-
getNotificationAppLaunchDetails(
) → Future< NotificationAppLaunchDetails?> -
Returns info on if a notification had been used to launch the application.
inherited
-
getNotificationChannels(
) → Future< List< AndroidNotificationChannel> ?> - Returns the list of all notification channels.
-
initialize(
AndroidInitializationSettings initializationSettings, {SelectNotificationCallback? onSelectNotification}) → Future< bool?> - Initializes the plugin. Call this method on application before using the plugin further.
-
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
inherited
-
periodicallyShow(
int id, String? title, String? body, RepeatInterval repeatInterval, {AndroidNotificationDetails? notificationDetails, String? payload, bool androidAllowWhileIdle = false}) → Future< void> -
Periodically show a notification using the specified interval.
For example, specifying a hourly interval means the first time the
notification will be an hour after the method has been called and then
every hour after that.
override
-
schedule(
int id, String? title, String? body, DateTime scheduledDate, AndroidNotificationDetails? notificationDetails, {String? payload, bool androidAllowWhileIdle = false}) → Future< void> - Schedules a notification to be shown at the specified date and time.
-
show(
int id, String? title, String? body, {AndroidNotificationDetails? notificationDetails, String? payload}) → Future< void> -
Show a notification with an optional payload that will be passed back to
the app when a notification is tapped on.
override
-
showDailyAtTime(
int id, String? title, String? body, Time notificationTime, AndroidNotificationDetails? notificationDetails, {String? payload}) → Future< void> - Shows a notification on a daily interval at the specified time.
-
showWeeklyAtDayAndTime(
int id, String? title, String? body, Day day, Time notificationTime, AndroidNotificationDetails? notificationDetails, {String? payload}) → Future< void> - Shows a notification on weekly interval at the specified day and time.
-
toString(
) → String -
A string representation of this object.
inherited
-
zonedSchedule(
int id, String? title, String? body, TZDateTime scheduledDate, AndroidNotificationDetails? notificationDetails, {required bool androidAllowWhileIdle, String? payload, DateTimeComponents? matchDateTimeComponents}) → Future< void> - Schedules a notification to be shown at the specified date and time relative to a specific time zone.
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited