FlutterBactrack class

This class provides the main interface to the BACtrack Flutter plugin. It is a singleton so only one instance will ever be created in a Flutter application.

Properties

currentStatus BACtrackStatus
The last status update that was received by the plugin and emitted by the statusStream.
no setter
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
statusStream Stream<BACtrackStatus>
This Stream emits BACtrackStatus objects to allow the Flutter application to monitor the state of the BACtrack SDK and device.
no setter

Methods

connectToNearestBreathalyzer({bool withTimeout = false}) Future
Connect to the nearest breathalyzer that can be found. The following states can be emitted on the statusStream in response:
disconnect() Future
Disconnect from the connected device. The following states can be emitted on the statusStream in response:
dispose() → void
The dispose method should always be called when the application is done using this plugin so it has the chance to clean up its resources.
getBreathalyzerBatteryVoltage() Future<bool?>
Get the battery voltage and level from the connected device. The following states can be emitted on the statusStream in response:
getFirmwareVersion() Future<bool?>
Get the firmware version from the connected device. The following states can be emitted on the statusStream in response:
getSerialNumber() Future<bool?>
Get the serial number from the connected device. The following states can be emitted on the statusStream in response:
getUseCount() Future<bool?>
Get the use count from the connected device. The following states can be emitted on the statusStream in response:
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
startCountdown() Future<bool?>
Start the process of collecting a BAC reading. The following states can be emitted on the statusStream in response:
toString() String
A string representation of this object.
inherited

Operators

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

Static Methods

instance(String apiKey) Future<FlutterBactrack>
Use this method to get a reference to an object that allows you to interact with a BACtrack device.

Constants

CHANNEL_ID → const String