LiveUpdateContent class final

Content shown by a live update on every platform.

Annotations

Constructors

LiveUpdateContent({required String title, String? body, double? progress, String? iconName, String? route, LiveUpdateImage? image, List<LiveUpdateAction> actions = const [], LiveUpdateTimer? timer, List<LiveUpdateMetric> metrics = const [], int? criticalMetric, LiveUpdateSteps? steps, LiveUpdateJourney? journey, IosLiveUpdateOptions? ios, AndroidLiveUpdateOptions? android})
Creates live update content.
const

Properties

actions → List<LiveUpdateAction>
Buttons. Presses arrive on LiveUpdates.onAction and LiveUpdate.actions while the app is in the foreground, else at the background action handler.
final
android → AndroidLiveUpdateOptions?
Android-only options.
final
body → String?
Secondary text.
final
criticalMetric → int?
Index in metrics of the most important one, which Android may show in the status bar chip of a promoted Live Update. Defaults to the first; ignored when out of range.
final
hashCode → int
The hash code for this object.
no setteroverride
iconName → String?
Platform asset name of the icon (an Android drawable or mipmap, or an image in the iOS widget extension's asset catalog).
final
image → LiveUpdateImage?
Picture shown with the update: a thumbnail in the iOS widget template and the large icon of the Android notification (not shown on Android 17 with metrics).
final
ios → IosLiveUpdateOptions?
iOS-only options.
final
journey → LiveUpdateJourney?
Where something travels from and to. iOS shows it with IosLiveUpdateLayout.journey; Android shows "from → to" in the text.
final
metrics → List<LiveUpdateMetric>
Values such as a score, a distance or a countdown (up to three are used). iOS shows them with IosLiveUpdateLayout.metrics; Android 17 (except AndroidLiveUpdateMode.classic) shows them with MetricStyle instead of the progress bar (and without the body); otherwise Android adds the number and text metrics to the text (use timer for a countdown there).
final
progress → double?
Progress between 0 and 1, or null when there is no progress bar.
final
route → String?
Route delivered to LiveUpdates.onTap when the user taps the update.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
steps → LiveUpdateSteps?
Stages of a process and the current one, such as an order going from placed to delivered. iOS shows them with IosLiveUpdateLayout.stepper; Android 16+ turns them into progress segments and points (unless AndroidLiveUpdateOptions.progressSegments or progressPoints are set) and shows the current stage in the text.
final
timer → LiveUpdateTimer?
A countdown or stopwatch that the system keeps running between updates, such as the time until a delivery arrives. Prefer it to updating a text every second, which uses up the update budget on both platforms.
final
title → String
Primary text.
final

Methods

copyWith({String? title, String? body, double? progress, String? iconName, String? route, LiveUpdateImage? image, List<LiveUpdateAction>? actions, LiveUpdateTimer? timer, List<LiveUpdateMetric>? metrics, int? criticalMetric, LiveUpdateSteps? steps, LiveUpdateJourney? journey, IosLiveUpdateOptions? ios, AndroidLiveUpdateOptions? android}) → LiveUpdateContent
Returns a copy with the given fields replaced.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
override

Operators

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