BluetoothConnection class

Represents ongoing Bluetooth connection to remote device.

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
input Stream<Uint8List>
Stream sink used to read from the remote Bluetooth device [...]
read / write
isConnected bool
Describes is stream connected.
read-only
output ↔ _BluetoothStreamSink<Uint8List>
Stream sink used to write to the remote Bluetooth device [...]
read / write
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

cancel() Future<void>
Closes connection (rather immediately), in result should also disconnect.
@Deprecated('Use `close` instead')
close() Future<void>
Closes connection (rather immediately), in result should also disconnect.
dispose() → void
Should be called to make sure the connection is closed and resources are freed (sockets/channels).
finish() Future<void>
Closes connection (rather gracefully), in result should also disconnect.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
inherited

Operators

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

Static Methods

toAddress(String address) Future<BluetoothConnection>
Returns connection to given address.