TrueCompassPlatform class abstract
The interface platform implementations must extend.
Raw events are maps with a kind key:
matrix:matrix(9 doubles, row-major device-to-world),screenRotation(degrees), optionalerrorDegrees. Android.heading:heading(magnetic degrees),compensated(bool, true when the value already follows the screen),screenRotation, optionalerrorDegrees. iOS and iOS Safari.euler:alpha,beta,gamma,absolute(bool),screenRotation. Web.accuracy:status(Android 0..3) orerrorDegrees.calibration: the OS asks to show the calibration prompt (iOS).
- Inheritance
-
- Object
- PlatformInterface
- TrueCompassPlatform
- Implementers
Constructors
- TrueCompassPlatform()
- Constructs a platform.
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
checkAvailability(
) → Future< CompassAvailability> - Whether the compass can be used.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
rawEvents(
RawSensorConfig config) → Stream< Map< String, Object?> > - Raw sensor events. The sensor runs only while the stream is listened to.
-
requestPermission(
) → Future< CompassAvailability> - Asks the user for sensor permission where the platform needs it.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance ↔ TrueCompassPlatform
-
The current implementation. Defaults to MethodChannelTrueCompass.
getter/setter pair