CosinussOne class

Inheritance
Implemented types

Constructors

CosinussOne({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
sensors List<Sensor<SensorValue>>
The sensors managed by this device. This is a read-only list of sensors.
no setteroverride

Methods

addDisconnectListener(VoidCallback listener) → void
inherited
capabilityAvailable<T>() Stream<void>
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
readBatteryPercentage() Future<int>
Reads the battery percentage of the device. The value is between 0 and 100.
override
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
toString() String
A string representation of this object.
inherited

Operators

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