models/cities library
Classes
- Cities
- Represents a city with its associated details such as name, location, and district ID.
Properties
Functions
-
getCitiesByDistrictId(
int districtId) → List< Cities> - Returns a list of Cities objects that belong to the specified district.
-
getCitiesByPostcode(
String postcode) → List< Cities> -
Returns a list of Cities objects with the specified
postcode. -
getCityById(
int id) → Cities? -
Returns the Cities object with the matching
id, ornullif no city is found. -
isCityInDistrict(
int cityId, int districtId) → bool -
Returns
trueif the city belongs to that district, otherwisefalse. -
searchCitiesByNameEn(
String name) → List< Cities> -
Returns a list of Cities objects whose English name contains the given
name(case-insensitive). -
searchCitiesByNameSi(
String name) → List< Cities> -
Returns a list of Cities objects whose Sinhala name contains the given
name(case-insensitive). -
searchCitiesByNameTa(
String name) → List< Cities> -
Returns a list of Cities objects whose Tamil name contains the given
name(case-insensitive).