MethodChannelFlutterAclasScalePlus class

Method channel implementation of FlutterAclasScalePlusPlatform.

Inheritance

Properties

eventStream Stream<AclasScaleEvent>
Stream of scale events (connected, disconnected, usb_attached, usb_detached, weight, error).
no setteroverride
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

closeScale() Future<void>
Close scale connection.
override
getConnectionType() Future<AclasConnectionType>
Current connection type set by initDevice (serial, usb, ble).
override
getDeviceList() Future<List<String>>
Get list of available devices (paths for serial, indices for USB, addresses for BLE).
override
getWeight() Future<AclasWeightInfo?>
Read current weight once.
override
getWeightEnsuringConnection() Future<AclasWeightInfo?>
If not connected, refreshes device list and opens scale with first device, then reads weight.
override
initDevice(AclasConnectionType type) Future<bool>
Initialize the scale for the given connection type. type must be AclasConnectionType.Serial, .USB, or .Bluetooth.
override
isConnected() Future<bool>
Whether the scale is currently connected.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openScale({String? path, int? index, String? address}) Future<int>
Open scale connection. Parameters depend on type:
override
setFrequency(int index) Future<bool>
Set frequency index (0-based).
override
setTarePre(int value) Future<bool>
Set preset tare value (integer).
override
startLiveWeight() Future<void>
Start streaming live weight; events will include "weight" until stopLiveWeight.
override
startLiveWeightEnsuringConnection() Future<void>
If not connected, refreshes device list and opens scale with first device, then starts live weight.
override
stopLiveWeight() Future<void>
Stop streaming live weight.
override
tare() Future<bool>
Tare the scale (weight must be stable).
override
toString() String
A string representation of this object.
inherited
zero() Future<bool>
Zero the scale (weight must be stable or overload).
override

Operators

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

Constants

eventChannel → const EventChannel
methodChannel → const MethodChannel