AppleWatchMotion class

Motion data from the Apple Watch, sampled at the rate specified by AppleWatchDevice.motionSamplingRate.

A 1:1 mapping of an AWMotionSensorData record. Fields belonging to a disabled sub-sensor (see AppleWatchDevice.accelerometerEnabled and AppleWatchDevice.deviceMotionEnabled) are zero.

Inheritance
Annotations
  • @JsonSerializable.new(fieldRename: FieldRename.none, includeIfNull: false)

Constructors

AppleWatchMotion({String? deviceId, DateTime? timestamp, String? label, double accX = 0, double accY = 0, double accZ = 0, double roll = 0, double pitch = 0, double yaw = 0, double gravityX = 0, double gravityY = 0, double gravityZ = 0, double rotationX = 0, double rotationY = 0, double rotationZ = 0, double userAccX = 0, double userAccY = 0, double userAccZ = 0})
AppleWatchMotion.fromJson(Map<String, dynamic> json)
factory
AppleWatchMotion.fromRecord(Map<String, dynamic> record)
Create an AppleWatchMotion from an AWARE ios_watch_motion record.

Properties

$type String?
The runtime class name (type) of this object. Used for deserialization from JSON objects.
getter/setter pairinherited
accX double
Raw acceleration on the x-axis in G (including gravity).
getter/setter pair
accY double
Raw acceleration on the y-axis in G (including gravity).
getter/setter pair
accZ double
Raw acceleration on the z-axis in G (including gravity).
getter/setter pair
dataType → DataType
The type of this data as a DataType.
no setterinherited
deviceId String?
The AWARE device id of the Apple Watch which collected this data.
getter/setter pairinherited
fromJsonFunction Function
The function which can convert a JSON string to an object of this type.
no setteroverride
gravityX double
Gravity vector on the x-axis in G.
getter/setter pair
gravityY double
Gravity vector on the y-axis in G.
getter/setter pair
gravityZ double
Gravity vector on the z-axis in G.
getter/setter pair
hashCode int
The hash code for this object.
no setterinherited
jsonType String
Return the __type to be used for JSON serialization of this class. Default is runtimeType. Only specify this if you need another type.
no setteroverride
label String?
The AWARE data label of this data, if any.
getter/setter pairinherited
pitch double
Attitude - pitch in radians.
getter/setter pair
recordId String?
Stable identifier of the source record, if available.
no setterinherited
roll double
Attitude - roll in radians.
getter/setter pair
rotationX double
Rotation rate around the x-axis in radians per second.
getter/setter pair
rotationY double
Rotation rate around the y-axis in radians per second.
getter/setter pair
rotationZ double
Rotation rate around the z-axis in radians per second.
getter/setter pair
rowId int?
The id of the record in the local database on the Apple Watch.
getter/setter pairinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
timestamp DateTime
The timestamp of this data, as set by the Apple Watch.
getter/setter pairinherited
userAccX double
User acceleration on the x-axis in G (gravity removed).
getter/setter pair
userAccY double
User acceleration on the y-axis in G (gravity removed).
getter/setter pair
userAccZ double
User acceleration on the z-axis in G (gravity removed).
getter/setter pair
yaw double
Attitude - yaw in radians.
getter/setter pair

Methods

equivalentTo(Data other) bool
Is this data equivalent to other?
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
Return a JSON encoding of this object.
override
toString() String
A string representation of this object.
override

Operators

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