PushNotification class
Push Notification
Constructors
- PushNotification({String title = "", String body = ""})
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
-
addActions(
List< AndroidNotificationAction> actions) → PushNotification - Add actions to the push notification
-
addAdditionalFlags(
List< int> additionalFlags) → PushNotification - Add additional flags to the push notification
-
addAttachment(
String url, String fileName, {bool? showThumbnail}) → PushNotification - Add an attachment to the push notification
-
addAudioAttributesUsage(
AudioAttributesUsage audioAttributesUsage) → PushNotification - Add audio attributes usage to the push notification
-
addAutoCancel(
bool autoCancel) → PushNotification - Add auto cancel to the push notification
-
addBadgeNumber(
int badgeNumber) → PushNotification - Add the badge number to the push notification
-
addCategoryIdentifier(
String categoryIdentifier) → PushNotification - Add category identifier to the push notification
-
addChannelAction(
AndroidNotificationChannelAction channelAction) → PushNotification - Add channel action to the push notification
-
addChannelDescription(
String channelDescription) → PushNotification - Add channel description to the push notification
-
addChannelId(
String channelId) → PushNotification - Add channel Id to the push notification
-
addChannelName(
String channelName) → PushNotification - Add channel name to the push notification
-
addChannelShowBadge(
bool channelShowBadge) → PushNotification - Add channel show badge to the push notification
-
addChronometerCountDown(
bool chronometerCountDown) → PushNotification - Add chronometer count down to the push notification
-
addColor(
Color color) → PushNotification - Add color to the push notification
-
addColorized(
bool colorized) → PushNotification - Add colorized to the push notification
-
addEnableLights(
bool enableLights) → PushNotification - Add enable lights to the push notification
-
addEnableVibration(
bool enableVibration) → PushNotification - Add enable vibration to the push notification
-
addFullScreenIntent(
bool fullScreenIntent) → PushNotification - Add full screen intent to the push notification
-
addGroupAlertBehavior(
GroupAlertBehavior groupAlertBehavior) → PushNotification - Add group alert behavior to the push notification
-
addGroupKey(
String groupKey) → PushNotification - Add group key to the push notification
-
addIcon(
String icon) → PushNotification - Add icon to the push notification
-
addId(
int id) → PushNotification - Add an id to the push notification
-
addImportance(
Importance importance) → PushNotification - Add importance to the push notification
-
addIndeterminate(
bool indeterminate) → PushNotification - Add indeterminate to the push notification
-
addInterruptionLevel(
InterruptionLevel interruptionLevel) → PushNotification - Add interruption level to the push notification
-
addLargeIcon(
String largeIcon) → PushNotification - Add large icon to the push notification
-
addLedColor(
Color ledColor) → PushNotification - Add led color to the push notification
-
addLedOffMs(
int ledOffMs) → PushNotification - Add led off ms to the push notification
-
addLedOnMs(
int ledOnMs) → PushNotification - Add led on ms to the push notification
-
addMaxProgress(
int maxProgress) → PushNotification - Add max progress to the push notification
-
addOngoing(
bool ongoing) → PushNotification - Add ongoing to the push notification
-
addOnlyAlertOnce(
bool onlyAlertOnce) → PushNotification - Add only alert once to the push notification
-
addPayload(
String payload) → PushNotification - Add a payload to the push notification
-
addPlaySound(
bool playSound) → PushNotification - Add play sound to the push notification
-
addPresentAlert(
bool presentAlert) → PushNotification - Add present alert to the push notification
-
addPresentBadge(
bool presentBadge) → PushNotification - Add present badge to the push notification
-
addPresentBanner(
bool presentBanner) → PushNotification - Add present banner to the push notification
-
addPresentList(
bool presentList) → PushNotification - Add present list to the push notification
-
addPresentSound(
bool presentSound) → PushNotification - Add present sound to the push notification
-
addPriority(
Priority priority) → PushNotification - Add priority to the push notification
-
addProgress(
int progress) → PushNotification - Add progress to the push notification
-
addSetAsGroupSummary(
bool setAsGroupSummary) → PushNotification - Add set as group summary to the push notification
-
addShortcutId(
String shortcutId) → PushNotification - Add shortcut id to the push notification
-
addShowProgress(
bool showProgress) → PushNotification - Add show progress to the push notification
-
addShowWhen(
bool showWhen) → PushNotification - Add show when to the push notification
-
addSilent(
bool silent) → PushNotification - Add silent to the push notification
-
addSound(
String sound) → PushNotification - Add a sound to the push notification
-
addSubtitle(
String subtitle) → PushNotification - Add a subtitle to the push notification
-
addTag(
String tag) → PushNotification - Add tag to the push notification
-
addThreadIdentifier(
String threadIdentifier) → PushNotification - Add thread identifier to the push notification
-
addTicker(
String ticker) → PushNotification - Add ticker to the push notification
-
addTimeoutAfter(
int timeoutAfter) → PushNotification - Add timeout after to the push notification
-
addUsesChronometer(
bool usesChronometer) → PushNotification - Add uses chronometer to the push notification
-
addVibrationPattern(
List< int> vibrationPattern) → PushNotification - Add vibration pattern to the push notification
-
addVisibility(
NotificationVisibility visibility) → PushNotification - Add visibility to the push notification
-
addWhen(
int when) → PushNotification - Add when to the push notification
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
send(
{DateTime? at}) → Future< void> - Send the push notification
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
cancelAllNotifications(
) → Future< void> - Cancel all notifications
-
cancelNotification(
int id, {String? tag}) → Future< void> - Cancel a notification
-
clearBadgeCount(
) → dynamic - Clear badge count
-
requestPermissions(
{bool alert = true, bool badge = true, bool sound = true, bool provisional = false, bool critical = false, bool vibrate = true, bool enableLights = true, String channelId = "default_notification_channel_id", String channelName = "Default Notification Channel", String? description, String? groupId, Importance? importance, List< int> ? vibratePattern, Color? ledColor, AudioAttributesUsage? audioAttributesUsage}) → Future<void> - Request permissions
-
sendNotification(
{required String title, required String body, String? payload, DateTime? at, int? id, String? subtitle, int? badgeNumber, String? sound, String? channelId, String? channelName, String? channelDescription, Importance? importance, Priority? priority, String? ticker, String? icon, bool? playSound, bool? enableVibration, List< int> ? vibrationPattern, String? groupKey, bool? setAsGroupSummary, GroupAlertBehavior? groupAlertBehavior, bool? autoCancel, bool? ongoing, bool? silent, Color? color, String? largeIcon, bool? onlyAlertOnce, bool? showWhen, int? when, bool? usesChronometer, bool? chronometerCountDown, bool? channelShowBadge, bool? showProgress, int? maxProgress, int? progress, bool? indeterminate, AndroidNotificationChannelAction? channelAction, bool? enableLights, Color? ledColor, int? ledOnMs, int? ledOffMs, NotificationVisibility? visibility, int? timeoutAfter, bool? fullScreenIntent, String? shortcutId, List<int> ? additionalFlags, String? tag, List<AndroidNotificationAction> ? actions, bool? colorized, AudioAttributesUsage? audioAttributesUsage, bool? presentList, bool? presentAlert, bool? presentBadge, bool? presentSound, bool? presentBanner, String? threadIdentifier, String? categoryIdentifier, InterruptionLevel? interruptionLevel}) → dynamic - Send a notification Example: