TCPSocketAction.fromJson constructor

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

Creates a TCPSocketAction from JSON data.

Implementation

factory TCPSocketAction.fromJson(Map<String, dynamic> json) {
  final tempHostJson = json['host'];
  final tempPortJson = json['port'];

  final String? tempHost = tempHostJson;
  final IntOrString tempPort = IntOrString(tempPortJson);

  return TCPSocketAction(
    host: tempHost,
    port: tempPort,
  );
}