AndroidNotificationConfig class

Configuration options specific to Android notifications.

This class encapsulates all Android-specific notification settings, making it easier to configure and pass Android notification options.

Constructors

AndroidNotificationConfig({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})
Creates an AndroidNotificationConfig with the specified options.
const

Properties

actions → List<AndroidNotificationAction>?
Action buttons for the notification.
final
additionalFlags → List<int>?
Additional flags for the notification.
final
audioAttributesUsage → AudioAttributesUsage?
The audio attributes usage type.
final
autoCancel → bool?
Whether to auto-cancel when tapped.
final
channelAction → AndroidNotificationChannelAction?
The action to take on the notification channel.
final
channelDescription → String?
The channel description for the notification.
final
channelId → String?
The channel ID for the notification.
final
channelName → String?
The channel name for the notification.
final
channelShowBadge → bool?
Whether to show badge on the channel.
final
chronometerCountDown → bool?
Whether the chronometer counts down.
final
color → Color?
The accent color for the notification.
final
colorized → bool?
Whether the notification is colorized.
final
enableLights → bool?
Whether to enable notification lights.
final
enableVibration → bool?
Whether to enable vibration.
final
fullScreenIntent → bool?
Whether to launch as full screen intent.
final
groupAlertBehavior → GroupAlertBehavior?
The alert behavior for grouped notifications.
final
groupKey → String?
The group key for grouping notifications.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → String?
The small icon resource name.
final
importance → Importance?
The importance level of the notification.
final
indeterminate → bool?
Whether progress is indeterminate.
final
largeIcon → String?
The large icon resource path.
final
ledColor → Color?
The LED light color.
final
ledOffMs → int?
LED off duration in milliseconds.
final
ledOnMs → int?
LED on duration in milliseconds.
final
maxProgress → int?
Maximum progress value.
final
ongoing → bool?
Whether the notification is ongoing (cannot be dismissed).
final
onlyAlertOnce → bool?
Whether to only alert once.
final
playSound → bool?
Whether to play a sound.
final
priority → Priority?
The priority of the notification.
final
progress → int?
Current progress value.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
setAsGroupSummary → bool?
Whether this notification is the group summary.
final
shortcutId → String?
The shortcut ID for the notification.
final
showProgress → bool?
Whether to show progress indicator.
final
showWhen → bool?
Whether to show the timestamp.
final
silent → bool?
Whether the notification is silent.
final
tag → String?
The tag for the notification.
final
ticker → String?
The ticker text for accessibility.
final
timeoutAfter → int?
Auto-dismiss timeout in milliseconds.
final
usesChronometer → bool?
Whether to use chronometer display.
final
vibrationPattern → List<int>?
Custom vibration pattern in milliseconds.
final
visibility → NotificationVisibility?
The visibility of the notification on lock screen.
final
when → int?
Custom timestamp in milliseconds since epoch.
final

Methods

copyWith({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}) → AndroidNotificationConfig
Creates a copy of this config with the specified fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

defaults → AndroidNotificationConfig
Returns the default Android notification configuration.
no setter