ArSensorBackend class
Platform streams and permission calls used by ArSensorManager.
The defaults talk to the device. Replace them, e.g. with StreamControllers, to test code using ArSensorManager without hardware.
Constructors
-
ArSensorBackend({Stream<
AccelerometerEvent> accelerometer() = _accelerometer, Stream<CompassEvent> ? compass() = _compass, Stream<Position> position({LocationSettings? locationSettings}) = Geolocator.getPositionStream, Future<PermissionStatus> locationPermissionStatus() = _locationPermissionStatus, Future<PermissionStatus> requestLocationPermission() = _requestLocationPermission}) -
const
Properties
-
accelerometer
→ Stream<
AccelerometerEvent> Function() -
Raw accelerometer samples, only used for the pitch until the compass
provides a full rotation matrix.
final
-
compass
→ Stream<
CompassEvent> ? Function() -
Heading and attitude from the plugin's native side, null when
unavailable.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
-
locationPermissionStatus
→ Future<
PermissionStatus> Function() -
final
-
position
→ Stream<
Position> Function({LocationSettings? locationSettings}) -
final
-
requestLocationPermission
→ Future<
PermissionStatus> Function() -
Prompts the user for the location permission.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited