fromJson static method
Parses json object to AvailableMap
Implementation
static AvailableMap? fromJson(json) {
final MapType? mapType =
Utils.enumFromString(MapType.values, json['mapType']);
if (mapType != null) {
return AvailableMap(
mapName: json['mapName'],
mapType: mapType,
icon: 'packages/map_launcher/assets/icons/${json['mapType']}.svg',
);
} else {
return null;
}
}