Connection.fromJson constructor

Connection.fromJson(
  1. Map<String, dynamic> json
)

This Dart factory method creates a Connection object from a JSON map.

Args: json (Map String, dynamic ): The json parameter in the Connection.fromJson factory method is a map that contains key-value pairs representing the properties of a Connection object. The keys in the map correspond to the properties of the Connection class (id, fromNodeId, fromPortId, toNodeId, to

Implementation

factory Connection.fromJson(Map<String, dynamic> json) => Connection(
      id: json['id'],
      fromNodeId: json['fromNodeId'],
      fromPortId: json['fromPortId'],
      toNodeId: json['toNodeId'],
      toPortId: json['toPortId'],
    );