asMap method

  1. @override
Map<String, Object?> asMap()
override

Returns the object data as a map like Map<String, dynamic>.

Implementation

@override
Map<String, Object?> asMap() {
  final map = <String, Object?>{
    'wind': _wind.asMap(),
    'prevailing_visibility': _prevailing.asMap(),
    'weathers': weathers.items.map((weather) => weather.asMap()).toList(),
    'clouds': clouds.items.map((cloud) => cloud.asMap()).toList(),
    'flight_rules': flightRules,
  };
  map.addAll(super.asMap());
  return map;
}