Cities class
Represents a city with its associated details such as name, location, and district ID.
Constructors
- Cities({required int id, required int districtId, required String nameEn, required String nameSi, required String nameTa, required String postcode, required double latitude, required double longitude})
- Creates a new Cities instance with the required properties.
-
Cities.fromJson(Map<
String, dynamic> json) -
Creates a new Cities instance from a JSON map.
factory
Properties
- districtId → int
-
The ID of the district to which this city belongs.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- id → int
-
Unique identifier for the city.
final
- latitude → double
-
The latitude coordinate of the city.
final
- longitude → double
-
The longitude coordinate of the city.
final
- nameEn → String
-
The English name of the city.
final
- nameSi → String
-
The Sinhala name of the city.
final
- nameTa → String
-
The Tamil name of the city.
final
- postcode → String
-
The postcode of the city.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> - Converts a Cities object into a JSON map.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited