LuckRingPluginPlatform class abstract

The interface that implementations of luck_ring_plugin must implement.

Platform implementations should extend this class rather than implement it as luck_ring_plugin does not consider newly added methods to be breaking changes. Extending this class (using extends) ensures that the subclass will get the default implementation, while platform implementations that implements this interface will be broken by newly added LuckRingPluginPlatform methods.

Inheritance
  • Object
  • PlatformInterface
  • LuckRingPluginPlatform
Implementers

Constructors

LuckRingPluginPlatform()
Constructs a LuckRingPluginPlatform.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scanResults Stream<List<ScanDevice>>
Stream of discovered devices.
no setter

Methods

connect(String address) Future<bool>
Connects to a device by its MAC address.
disconnect() Future<void>
Disconnects from the current device.
getHealthData() Future<HealthData>
Fetches all health data from the connected ring. Triggers sync and waits for data (up to ~30s). Ensure device is connected before calling.
getPlatformVersion() Future<String?>
Returns the platform version string.
init() Future<void>
Initializes the SDK.
isConnected() Future<bool>
Returns true if a device is currently connected.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startScan({int timeoutMs = 12000}) Future<void>
Starts scanning for nearby devices.
stopScan() Future<void>
Stops the current scan.
toString() String
A string representation of this object.
inherited

Operators

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

Static Properties

instance LuckRingPluginPlatform
The default instance of LuckRingPluginPlatform to use.
getter/setter pair