toMap method

Map<String, String> toMap()

Converts the City object into a Map.

Implementation

Map<String, String> toMap() {
  return {
    'name': name,
    'population': population,
    'area': area,
    'tehsils': tehsils.toString(),
  };
}