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}) -
constfactory
-
TriggerActivation.fromJson(Map<
String, dynamic> json) -
factory
Properties
- asset → Asset
-
assetis 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
-
dateis the date when the trigger was activated.no setterinherited - hashCode → int
-
The hash code for this object.
no setterinherited
- id → String
-
idof the trigger activation entity. This ID is unique.no setterinherited - position → TelemetryPosition?
-
positionis the position of the asset when the trigger was activated.no setterinherited - presenceType → TriggerGeofenceDetectionMode?
-
presenceTypeis 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> ? -
sensorsis the list of sensors that were activated when the trigger was activated.no setterinherited - trigger → Trigger?
-
triggeris 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
Aswitch-like method, using callbacks. -
mapOrNull<
TResult extends Object?> (TResult? $default(_TriggerActivation value)?) → TResult? -
Available on TriggerActivation, provided by the TriggerActivationPatterns extension
A variant ofmapthat fallback to returningnull. -
maybeMap<
TResult extends Object?> (TResult $default(_TriggerActivation value)?, {required TResult orElse()}) → TResult -
Available on TriggerActivation, provided by the TriggerActivationPatterns extension
A variant ofmapthat fallback to returningorElse. -
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 ofwhenthat fallback to anorElsecallback. -
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
Aswitch-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 ofwhenthat fallback to returningnull
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited