CityResult class

Represents a city, state, or country result from GeoDB

Constructors

CityResult({required String name, required String state, required String country, required String iso2, required double lat, required double lng, required int population, required String geoid, double? distanceKm})
const
CityResult.fromMap(Map<String, dynamic> map)
Create from JSON map
factory

Properties

country String
Country name
final
distanceKm double?
Distance in kilometers (only for spatial queries)
final
geoid String
Unique geographic identifier (empty string for countries and states)
final
hashCode int
The hash code for this object.
no setteroverride
iso2 String
ISO2 country code
final
lat double
Latitude
final
lng double
Longitude
final
name String
Name of the location
final
population int
Population
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
state String
State name (empty for countries)
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() Map<String, dynamic>
Convert to JSON map
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override