MethodChannelNotificationMaster class

An implementation of NotificationMasterPlatform that uses method channels.

Inheritance

Properties

hashCode int
The hash code for this object.
no setterinherited
methodChannel MethodChannel
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

cancelAllScheduledNotifications() Future<bool>
Cancel every notification that was scheduled through scheduleNotification.
override
cancelScheduledNotification(int id) Future<bool>
Cancel a previously scheduled notification by its id.
override
canScheduleExactAlarms() Future<bool>
Android 12+: whether the app may schedule exact alarms. Other platforms return true.
override
checkNotificationPermission() Future<bool>
override
createCustomChannel({required String channelId, required String channelName, String? channelDescription, int? importance, bool? enableLights, int? lightColor, bool? enableVibration, bool? enableSound}) Future<bool>
override
getActiveNotificationService() Future<String>
override
getDeviceToken() Future<String?>
override
getPendingScheduledNotifications() Future<List<int>>
Returns the ids of notifications that are scheduled but not yet delivered.
override
getPlatformVersion() Future<String?>
override
getSubscribedTopics() Future<List<String>>
Returns the list of topics the device is currently subscribed to. On Android/iOS with Firebase this reflects both FCM and local subscriptions. Without Firebase, it reflects locally stored subscriptions only.
override
isBackgroundPollingRunning() Future<bool>
Whether the background poller process is currently running.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openAppNotificationSettings() Future<bool>
Opens app notification settings (Android). User must grant manually.
override
openExactAlarmSettings() Future<bool>
Opens system Settings for "Alarms & reminders" (Android). User must grant manually. No-op / false on other platforms.
override
requestNotificationPermission() Future<bool>
override
scheduleNotification({required int id, required String title, required String message, required int scheduledEpochMillis, String? channelId, NotificationImportance? importance, bool alarmSound = false, String? targetScreen, Map<String, dynamic>? extraData}) Future<bool>
Schedule a notification to be delivered by the operating system at a specific point in time, even when the app is fully closed.
override
setFirebaseAsActiveService() Future<bool>
override
showBigTextNotification({required String title, required String message, required String bigText, String? channelId, NotificationImportance? importance, bool? autoCancel, String? targetScreen, Map<String, dynamic>? extraData}) Future<int>
override
showFullScreenNotification({required String title, required String message, String? targetScreen, Map<String, dynamic>? extraData}) Future<int>
override
showHeadsUpNotification({required String title, required String message, String? targetScreen, Map<String, dynamic>? extraData}) Future<int>
override
showImageNotification({required String title, required String message, required String imageUrl, String? channelId, NotificationImportance? importance, bool? autoCancel, String? targetScreen, Map<String, dynamic>? extraData}) Future<int>
override
showNotification({int? id, required String title, required String message, String? channelId, NotificationImportance? importance, bool? autoCancel, String? targetScreen, Map<String, dynamic>? extraData}) Future<int>
override
showNotificationWithActions({required String title, required String message, required List<Map<String, String>> actions, String? channelId, NotificationImportance? importance, bool? autoCancel, String? targetScreen, Map<String, dynamic>? extraData}) Future<int>
override
showStyledNotification({required String title, required String message, String? channelId, String? targetScreen, Map<String, dynamic>? extraData}) Future<int>
override
startBackgroundPollingService({required String pollingUrl, int? intervalMinutes}) Future<bool>
Start a standalone background poller process that keeps polling pollingUrl and showing toasts even after the app is fully closed (Windows only).
override
startForegroundService({required String pollingUrl, int? intervalMinutes, String? channelId}) Future<bool>
override
startNotificationPolling({required String pollingUrl, int? intervalMinutes}) Future<bool>
override
stopBackgroundPollingService() Future<bool>
Stop the background poller process started via startBackgroundPollingService.
override
stopForegroundService() Future<bool>
override
stopNotificationPolling() Future<bool>
override
subscribeToTopic(String topic) Future<bool>
override
toString() String
A string representation of this object.
inherited
unsubscribeFromTopic(String topic) Future<bool>
override

Operators

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