PortNum.fromJson constructor

PortNum.fromJson(
  1. dynamic json
)

Implementation

factory PortNum.fromJson(dynamic json) {
  if (json == '*' || json == null) return PortNum.star();
  if (json is int) return PortNum.fromInt(json);
  throw ArgumentError('Invalid PortNum value: $json');
}