LiveActivityPayload class abstract
Payload describing the full desired state of a Live Activity (iOS) / Live Notification (Android).
ActivityKit replaces the content-state wholesale on every update, so callers must always pass the complete desired state to both CustomerIOLiveActivitiesPlatform.start and CustomerIOLiveActivitiesPlatform.update.
The field names are identical across both platforms and map directly to the native template attributes.
Constructors
- LiveActivityPayload(LiveActivityTemplate type)
-
const
- LiveActivityPayload.countdownTimer({required String header, required String title, String? statusMessage, int? endTime})
-
Creates a payload for the LiveActivityTemplate.countdownTimer template.
constfactory
-
LiveActivityPayload.custom({required Map<
String, String> data}) -
Creates a payload for your own activity type, named by
LiveActivitiesConfig.customType.constfactory - LiveActivityPayload.segments({required String header, required String status, String? substatus, required int segmentsTotal, required int segmentsComplete, String? trailingText})
-
Creates a payload for the LiveActivityTemplate.segments template.
constfactory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → LiveActivityTemplate
-
The built-in template this payload targets.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, dynamic> - Serializes the payload into a flat map understood by the native handlers.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited