PortStatus.fromJson constructor
Creates a PortStatus from JSON data.
Implementation
factory PortStatus.fromJson(Map<String, dynamic> json) {
final tempErrorJson = json['error'];
final tempPortJson = json['port'];
final tempProtocolJson = json['protocol'];
final String? tempError = tempErrorJson;
final int tempPort = tempPortJson;
final String tempProtocol = tempProtocolJson;
return PortStatus(
error: tempError,
port: tempPort,
protocol: tempProtocol,
);
}