AndroidLiveUpdateOptions class final
Options that only apply to Android notifications.
- Annotations
Constructors
-
AndroidLiveUpdateOptions({String channelId = 'live_updates', String channelName = 'Live updates', String? shortCriticalText, Color? color, DateTime? when, bool showChronometer = false, AndroidLiveUpdateMode mode = AndroidLiveUpdateMode.liveUpdate, LiveUpdateSemanticStyle? bodySemanticStyle, LiveUpdateSemanticStyle? progressSemanticStyle, List<
AndroidProgressSegment> progressSegments = const [], List<AndroidProgressPoint> progressPoints = const [], String? progressTrackerIcon, Duration? timeoutAfter, bool alert = false}) -
Creates Android options.
const
Properties
- alert → bool
-
Play the channel's sound and vibration for this post. By default only
the first post of an update alerts the user. At most one alert per
update every 10 seconds (iOS: IosLiveUpdateOptions.alert).
final
- bodySemanticStyle → LiveUpdateSemanticStyle?
-
Semantic color of LiveUpdateContent.body (Android 17+). The system
picks the actual color, and only applies it to promoted Live Updates.
Not visible on Android 17 when LiveUpdateContent.metrics are set,
because the body is not shown.
final
- channelId → String
-
Notification channel id. The channel is created on first use.
final
- channelName → String
-
Notification channel name shown in system settings.
final
- color → Color?
-
Accent color.
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- mode → AndroidLiveUpdateMode
-
How the notification is shown on Android 16 and later (older versions
always show a regular ongoing notification with a progress bar).
final
-
progressPoints
→ List<
AndroidProgressPoint> -
Marks on the progress bar, such as stops (Android 16+).
final
-
progressSegments
→ List<
AndroidProgressSegment> -
Parts of the progress bar, such as the stages of a delivery (Android
16+
ProgressStyle). Lengths are relative; LiveUpdateContent.progress still runs from 0 to 1 over the whole bar.final - progressSemanticStyle → LiveUpdateSemanticStyle?
-
Semantic color of the progress bar (Android 17+, promoted Live Updates).
Used when there are no progressSegments.
final
- progressTrackerIcon → String?
-
Drawable shown at the current position of the progress bar, such as a
car or a parcel (Android 16+).
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- shortCriticalText → String?
-
Short text for the status bar chip of a promoted Live Update, such as
"5 min". Android suggests at most 7 characters and may truncate it.
final
- showChronometer → bool
-
Show a running chronometer based on when instead of a timestamp.
final
- timeoutAfter → Duration?
-
Removes the notification after this time (at least one minute, counted
from the latest post) even if the app is not running, so a forgotten
update does not stay on screen. A timed-out update reports
LiveUpdateState.ended, and its key can be started again.
Android 8+; on iOS use IosLiveUpdateOptions.staleDate and end the
activity.
final
- when → DateTime?
-
Time shown in the notification, or the chronometer base when
showChronometer is set.
final
Methods
-
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.
override