LocalPort class Null safety

Local message port for receiving messages.

Properties

hashCode int
The hash code for this object.
read-only, inherited
portName String
The local port name.
final
registered bool
Whether the local port is registered.
read-only
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited
trusted bool
Whether the local port is trusted.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
register(OnMessageReceived onMessage) → void
Registers the local port and sets a listener.
toString() String
A string representation of this object.
inherited
unregister() Future<void>
Unregisters the local port. No operation for already unregistered port.

Operators

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

Static Methods

create(String portName, {bool trusted = true}) Future<LocalPort>
Creates a local port.