InstanceNetworking.fromJson constructor

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

Implementation

factory InstanceNetworking.fromJson(Map<String, dynamic> json) {
  return InstanceNetworking(
    monthlyTransfer: json['monthlyTransfer'] != null
        ? MonthlyTransfer.fromJson(
            json['monthlyTransfer'] as Map<String, dynamic>)
        : null,
    ports: (json['ports'] as List?)
        ?.whereNotNull()
        .map((e) => InstancePortInfo.fromJson(e as Map<String, dynamic>))
        .toList(),
  );
}