toJson method

Map<String, dynamic> toJson()

Returns a JSON-compatible map that represents this GeoCoordinates.

This method can be used when storing this GeoCoordinates in a database or sending it over a network.

Implementation

Map<String, dynamic> toJson() {
  return {
    'latitude': latitude,
    'longitude': longitude,
  };
}