TriggerActivation class abstract

Available extensions
Annotations
  • @freezed

Constructors

TriggerActivation({required String id, required Asset asset, Trigger? trigger, TelemetryPosition? position, @JsonKey.new(unknownEnumValue: TriggerGeofenceDetectionMode.entrance) TriggerGeofenceDetectionMode? presenceType, List<TelemetrySensor>? sensors, @JsonKey.new(name: 'at') @TimestampConverter() required DateTime date})
const
factory
TriggerActivation.fromJson(Map<String, dynamic> json)
factory

Properties

asset Asset
asset is the asset that activated the trigger.
no setterinherited
copyWith → $TriggerActivationCopyWith<TriggerActivation>
Create a copy of TriggerActivation with the given fields replaced by the non-null parameter values.
no setterinherited
date DateTime
date is the date when the trigger was activated.
no setterinherited
hashCode int
The hash code for this object.
no setterinherited
id String
id of the trigger activation entity. This ID is unique.
no setterinherited
position TelemetryPosition?
position is the position of the asset when the trigger was activated.
no setterinherited
presenceType TriggerGeofenceDetectionMode?
presenceType is the type of presence in the geofence if the trigger was of a geofence presence.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sensors List<TelemetrySensor>?
sensors is the list of sensors that were activated when the trigger was activated.
no setterinherited
trigger Trigger?
trigger is the trigger that was activated.
no setterinherited

Methods

map<TResult extends Object?>(TResult $default(_TriggerActivation value)) → TResult

Available on TriggerActivation, provided by the TriggerActivationPatterns extension

A switch-like method, using callbacks.
mapOrNull<TResult extends Object?>(TResult? $default(_TriggerActivation value)?) → TResult?

Available on TriggerActivation, provided by the TriggerActivationPatterns extension

A variant of map that fallback to returning null.
maybeMap<TResult extends Object?>(TResult $default(_TriggerActivation value)?, {required TResult orElse()}) → TResult

Available on TriggerActivation, provided by the TriggerActivationPatterns extension

A variant of map that fallback to returning orElse.
maybeWhen<TResult extends Object?>(TResult $default(String id, Asset asset, Trigger? trigger, TelemetryPosition? position, TriggerGeofenceDetectionMode? presenceType, List<TelemetrySensor>? sensors, DateTime date)?, {required TResult orElse()}) → TResult

Available on TriggerActivation, provided by the TriggerActivationPatterns extension

A variant of when that fallback to an orElse callback.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Serializes this TriggerActivation to a JSON map.
inherited
toString() String
A string representation of this object.
inherited
when<TResult extends Object?>(TResult $default(String id, Asset asset, Trigger? trigger, TelemetryPosition? position, TriggerGeofenceDetectionMode? presenceType, List<TelemetrySensor>? sensors, DateTime date)) → TResult

Available on TriggerActivation, provided by the TriggerActivationPatterns extension

A switch-like method, using callbacks.
whenOrNull<TResult extends Object?>(TResult? $default(String id, Asset asset, Trigger? trigger, TelemetryPosition? position, TriggerGeofenceDetectionMode? presenceType, List<TelemetrySensor>? sensors, DateTime date)?) → TResult?

Available on TriggerActivation, provided by the TriggerActivationPatterns extension

A variant of when that fallback to returning null

Operators

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