NodesDisconnectedEvent.fromJson constructor

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

Implementation

factory NodesDisconnectedEvent.fromJson(Map<String, dynamic> json) {
  return NodesDisconnectedEvent(
    contextId: GraphObjectId.fromJson(json['contextId'] as String),
    sourceId: GraphObjectId.fromJson(json['sourceId'] as String),
    destinationId: GraphObjectId.fromJson(json['destinationId'] as String),
    sourceOutputIndex:
        json.containsKey('sourceOutputIndex')
            ? json['sourceOutputIndex'] as num
            : null,
    destinationInputIndex:
        json.containsKey('destinationInputIndex')
            ? json['destinationInputIndex'] as num
            : null,
  );
}