OpenEarableV1 class

Inheritance
Implemented types

Constructors

OpenEarableV1({required String name, required WearableDisconnectNotifier disconnectNotifier, required BleGattManager bleManager, required DiscoveredDevice discoveredDevice})

Properties

batteryPercentageStream Stream<int>
no setteroverride
capabilityRegistered Stream<List<Type>>
Stream that emits an event whenever a new capability is registered.
no setterinherited
deviceId String
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
name String
finalinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
sensorConfigurations List<SensorConfiguration<SensorConfigurationValue>>
A list of sensor configurations managed by this manager. This list is read-only and provides access to the available sensor configurations. Each configuration can be used to set specific behaviors for sensors. The configurations are expected to be of type SensorConfiguration.
no setteroverride
sensorConfigurationStream Stream<Map<SensorConfiguration<SensorConfigurationValue>, SensorConfigurationValue>>
A stream of sensor configuration values. This stream emits a map of sensor configurations and their corresponding values.
no setteroverride
sensors List<Sensor<SensorValue>>
The sensors managed by this device. This is a read-only list of sensors.
no setteroverride
supportedFirmwareRange → VersionConstraint
no setterinherited
supportedFrequencyPlayerWaveTypes List<WaveType>
no setteroverride
supportedJingles List<Jingle>
no setteroverride

Methods

addDisconnectListener(VoidCallback listener) → void
inherited
capabilityAvailable<T>() Stream<void>
inherited
checkFirmwareSupport() Future<FirmwareSupportStatus>
inherited
disconnect() Future<void>
override
getCapability<T>() → T?
Gets a specific capability of the wearable. Returns null if the capability is not supported by this wearable.
inherited
getWearableIconPath({bool darkmode = false, WearableIconVariant variant = WearableIconVariant.single}) String?
Gets path to an icon representing the wearable. Preferred type is SVG. Needs to be added to the asset section of the pubspec.yaml file. When setting the path here, keep in mind it's a lib ('packages/open_earable_flutter/assets/...').
override
hasCapability<T>() bool
Checks if the wearable has a specific capability.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
pauseAudio() Future<void>
override
playAudioFromStoragePath(String filepath) Future<void>
path The path to the audio file to play on the wearable.
override
playFrequency(WaveType waveType, {double frequency = 440.0, double loudness = 1}) Future<void>
waveType The type of waveform to play. frequency The frequency of the sound in Hz. loudness The loudness of the sound, should be a value between 0 and 1.
override
playJingle(Jingle jingle) Future<void>
override
readBatteryPercentage() Future<int>
Reads the battery percentage of the device. The value is between 0 and 100.
override
readDeviceFirmwareVersion() Future<String?>
Reads the device firmware version from the connected OpenEarable device.
override
readDeviceHardwareVersion() Future<String?>
Reads the device hardware version from the connected OpenEarable device.
override
readDeviceIdentifier() Future<String?>
Reads the device identifier from the connected OpenEarable device.
override
readFirmwareVersionNumber() Future<Version?>
inherited
registerCapability<T>(T capability) → void
Registers a specific capability for the wearable. Throws a StateError if the capability is already registered.
inherited
requireCapability<T>() → T
Gets a specific capability of the wearable, throwing a StateError if not supported.
inherited
startAudio() Future<void>
override
stopAudio() Future<void>
override
toString() String
A string representation of this object.
inherited
writeLedColor({required int r, required int g, required int b}) Future<void>
override

Operators

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