fromJson static method

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

Implementation

static ServiceRuntimeStatus fromJson(Map<String, dynamic> json) {
  final portsRaw = json["ports"];
  return ServiceRuntimeStatus(
    ports: portsRaw is List
        ? portsRaw.whereType<Map>().map((port) => ServicePortRuntimeState.fromJson(port.cast<String, dynamic>())).toList()
        : const [],
  );
}