Motion class

Handles motion on the Frame IMU.

Constructors

Motion(Frame frame)
Initializes the Motion class with a Frame instance.

Properties

frame Frame
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getDirection() Future<Direction>
Gets the orientation of the Frame. Note that the heading is not yet implemented on Frame and will always return 0.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
runOnTap({String? luaScript, void callback()?}) Future<void>
Runs a callback when the Frame is tapped. Can include Lua code to be run on Frame upon tap and/or a Dart callback to be run locally upon tap. Clears any existing callbacks and replaces them with the new ones passed in, so pass in null for both arguments if you want to remove any existing callbacks.
tappedStream() Stream<void>
Returns a stream that emits events when the Frame is tapped.
toString() String
A string representation of this object.
inherited
waitForTap() Future<void>
Waits for the Frame to be tapped before continuing.

Operators

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