toMap method Null safety

Map toMap()

Creates a map from the coordinates properties.

Implementation

Map toMap() => {
      'latitude': latitude,
      'longitude': longitude,
    };