LocationService class

Properties

hashCode → int
The hash code for this object.
no setterinherited
isDataLoaded → bool
Memory-efficient method to check if data is loaded without triggering load
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

clearCache() → void
getCitiesByStateId(String stateId) → Future<List<CityModel>>
getCityById(String id) → Future<CityModel?>
getCountryById(String id) → Future<CountryModel?>
getSearchSuggestions(String query, String type, {int limit = 5}) → List<String>
Get search suggestions with intelligent ranking and caching
getStateById(String id) → Future<StateModel?>
getStatesByCountryId(String countryId) → Future<List<StateModel>>
loadCities({String assetPath = 'packages/location_picker_plus/assets/city.json'}) → Future<List<CityModel>>
loadCountries({String assetPath = 'packages/location_picker_plus/assets/country.json'}) → Future<List<CountryModel>>
loadStates({String assetPath = 'packages/location_picker_plus/assets/state.json'}) → Future<List<StateModel>>
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
preloadFrequentData() → Future<void>
Preload frequently accessed data for instant dropdown responses
searchCities(String query, String? stateId, {int limit = 100}) → List<CityModel>
searchCountries(String query, {int limit = 50}) → List<CountryModel>
searchStates(String query, String? countryId, {int limit = 50}) → List<StateModel>
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

instance → LocationService
no setter