Connection.fromJson constructor
Implementation
factory Connection.fromJson(Map<String, dynamic> json) => (json['type'] == 0)
? ConnectionOut(
connectionId: json['connection_id'],
otherComponentId: json['other_component_id'],
)
: ConnectionIn(
connectionId: json['connection_id'],
otherComponentId: json['other_component_id'],
);