SerialManager class

Central manager for serial ports. Provides access to available ports and manages their lifecycle.

Constructors

SerialManager({SerialPlatformInterface? platform})
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

closeAll() Future<void>
Closes all open ports.
closePort(String portName) Future<void>
Closes a tracked serial port.
createPort() SerialPort
Creates a new SerialPort instance for the specified port. The port is not opened until open() is called.
getAvailablePorts() Future<List<SerialPortInfo>>
Gets the list of available serial ports.
getOpenPorts() Map<String, SerialPort>
Gets all open ports.
getPort(String portName) SerialPort?
Gets an open port by name.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
openPort(String portName, {int baudRate = 115200, int dataBits = 8}) Future<SerialPort>
Opens a serial port and tracks it.
openPortFromConfig(SerialConfig config) Future<SerialPort>
Opens a serial port and tracks it.
toString() String
A string representation of this object.
inherited

Operators

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