Hub class Null safety API

The main hub interaction class.

Constructors

Hub(IHubTransport transport)

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
hubState HubState
Access the hub state.
read-only
hubStateStream Stream<HubState>
Stream to listen to hub state changes
read-only
id String
returns the identifier of the hub. [...]
read-only
name String
returns the name of the hub.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
transport IHubTransport
final

Methods

connect() Future<bool>
internal function called from backend. Don't use.
disconnect() Future<void>
Disconnect from the Hub.
dispose() → void
Dispose should be called when you are finished with a hub. it is automatically called when IHubScanner is disposed.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
peripheral(int port) Peripheral?
access a peripheral directly.
queue(Transaction transaction) Future
Messages to the hub tend to be request response patterns queue takes a #Transaction object that hides the complications from the user.
send(Message message) Future<void>
Sends a message to he hub without waiting for a response. It is still queued in the transaction system waiting for a slot.
toString() String
A string representation of this object. [...]
inherited

Operators

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