TriggerEvent class
This class represents a Trigger Event - the event associated with a Trigger Sensor. When the sensor detects a trigger event condition, such as significant motion in the case of the {@link Sensor#TYPE_SIGNIFICANT_MOTION}, the {@link TriggerEventListener} is called with the TriggerEvent. The sensor is automatically canceled after the trigger.
This class holds information such as the value of the sensor when the trigger happened, the timestamp along with detailed information regarding the Sensor itself.
@see android.hardware.SensorManager @see android.hardware.TriggerEvent @see android.hardware.SensorConstructors
-
TriggerEvent(List<
double> values, Sensor sensor, int timestamp) -
const
- TriggerEvent.fromJson(String source)
-
factory
-
TriggerEvent.fromMap(Map<
String, dynamic> map) -
factory
Properties
- hashCode → int
-
The hash code for this object.
no setteroverride
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sensor → Sensor
-
The sensor that generated this event. See
{@link android.hardware.SensorManager SensorManager} for details.
final
- timestamp → int
-
The time in nanosecond at which the event happened
final
-
values
→ List<
double> -
The length and contents of the {@link #values values} array depends on
which {@link android.hardware.Sensor sensor} type is being monitored (see
also {@link SensorEvent} for a definition of the coordinate system used).
final
Methods
-
copyWith(
{List< double> ? values, Sensor? sensor, int? timestamp}) → TriggerEvent -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → String -
toMap(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
covariant TriggerEvent other) → bool -
The equality operator.
override