NativeSensor class
A native Android sensor reported by the device.
Constructors
- NativeSensor({required String name, required String vendor, required int type, required String typeName, required int version, required double resolution, required double maximumRange, required double power, required int minDelay, required int maxDelay, required bool isWakeUpSensor})
-
Creates a native sensor description.
const
-
NativeSensor.fromMap(Map<
Object?, Object?> map) -
Creates a NativeSensor from a map returned by the native platform.
factory
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- isWakeUpSensor → bool
-
Whether this sensor can wake the device from sleep.
final
- maxDelay → int
-
The maximum delay between sensor events in microseconds.
final
- maximumRange → double
-
The maximum value the sensor can report.
final
- minDelay → int
-
The minimum delay between sensor events in microseconds.
final
- name → String
-
The sensor name reported by Android.
final
- power → double
-
The sensor power usage in milliamps.
final
- resolution → double
-
The smallest change the sensor can measure.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → int
-
The Android sensor type integer.
final
- typeName → String
-
A readable name for the Android sensor type.
final
- vendor → String
-
The sensor vendor reported by Android.
final
- version → int
-
The sensor version reported by Android.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toMap(
) → Map< String, Object> - Converts this sensor to a map using the native field names.
-
toString(
) → String -
Returns a readable string containing all sensor fields.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited