SerialEvent class
A single event emitted on the FlSerial.events stream.
serial.events.listen((event) {
if (event.type == SerialEventType.data) {
final bytes = event.data as Uint8List;
}
});
Constructors
- SerialEvent(SerialEventType type, dynamic data)
-
Creates a SerialEvent with the given
typeand optionaldata.
Properties
- data → dynamic
-
Event payload — type depends on type:
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- type → SerialEventType
-
The kind of event.
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited