Locations.fromJson constructor

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

Implementation

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