AntplusBikepowerViewModel class

A view model managing the connection and telemetry streams for an ANT+ Bike Power Meter.

Implements AntplusDeviceViewModel to handle scanning, connection, and exposes multiple streams containing power, balance, cadence, pedal smoothness, torque effectiveness, and battery information.

Implemented types

Properties

hashCode → int
The hash code for this object.
no setterinherited
onBalanceDataStream → Stream<int>
A stream of the pedal power balance percentage.
no setter
onBatteryStatusDataStream → Stream<AntplusBatteryStatus>
A stream of the battery status of the bike power sensor.
no setter
onCadenceDataStream → Stream<int>
A stream of the real-time cadence value in revolutions per minute (rpm) calculated by the power meter.
no setter
onDeviceStateChangeStream → Stream<AntplusDeviceState>
A stream of the connection state for the bike power device.
no setteroverride
onPedalSmoothnessDataStream → Stream<AntplusPedalSmoothnessData>
A stream of pedal smoothness data containing left and right smoothness percentages.
no setter
onPowerDataStream → Stream<int>
A stream of the real-time power value in watts (W).
no setter
onRequestAccessResultStream → Stream<AntplusRequestAccessResult>
A stream of access request results specifically for bike power sensors.
no setteroverride
onScanResultStream → Stream<AntplusDevice>
A stream of discovered ANT+ bike power meters.
no setteroverride
onTorqueEffectivenessDataStream → Stream<AntplusTorqueEffectivenessData>
A stream of torque effectiveness data containing left and right torque effectiveness percentages.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

connect(int deviceNumber) → Future<void>
Connects to a bike power meter with the specified deviceNumber.
override
disconnect() → Future<void>
Disconnects from the current bike power meter.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startScan() → Future<void>
Starts scanning for nearby ANT+ bike power meters.
override
stopScan() → Future<void>
Stops the active scan for bike power meters.
override
toString() → String
A string representation of this object.
inherited

Operators

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

Static Properties

instance → AntplusBikepowerViewModel
The singleton instance of AntplusBikepowerViewModel.
no setter