Port class

The Port class represents a port with an ID, maximum number of links, label, and position in Dart, with methods for copying and converting to/from JSON.

Constructors

Port({required int id, int maxLinks = 1, String label = "Data", Offset position = Offset.zero})
Port.fromJson(Map<String, dynamic> json)
factory

Properties

hashCode int
The hash code for this object.
no setterinherited
id int
final
label String
final
final
position Offset
getter/setter pair
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

copyWith({Offset? position}) Port
The copyWith function in Dart creates a new Port object with updated properties.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

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