Location.fromJson constructor

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

Implementation

factory Location.fromJson(Map<String, dynamic> json) {
  return Location(
    availablePortSpeeds: (json['availablePortSpeeds'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    availableProviders: (json['availableProviders'] as List?)
        ?.whereNotNull()
        .map((e) => e as String)
        .toList(),
    locationCode: json['locationCode'] as String?,
    locationName: json['locationName'] as String?,
    region: json['region'] as String?,
  );
}