LocationRepository class abstract
Repository for location-based operations.
Handles address autocomplete, postal code lookup, geolocation, and customer address management.
- Inheritance
-
- Object
- CoreRepository
- LocationRepository
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
deleteCustomerAddress(
{required String customerId, required String addressId}) → Future< bool> - Delete a customer address
-
getAddressDetails(
{required String placeId}) → Future< Address> - Get full address details from a place ID or address ID
-
getAddressFromCoordinates(
{required double latitude, required double longitude}) → Future< Address?> - Get address from geographic coordinates (reverse geocoding)
-
getCoordinatesFromAddress(
{required Address address}) → Future< Map< String, double> ?> - Get coordinates from an address (forward geocoding)
-
getCountries(
{bool shippingOnly = false, bool billingOnly = false}) → Future< List< Country> > - Get list of available countries
-
getCountry(
{required String countryCode}) → Future< Country?> - Get country by code
-
getCustomerAddress(
{required String customerId, required String addressId}) → Future< Address?> - Get a specific customer address by ID
-
getCustomerAddresses(
{required String customerId}) → Future< List< Address> > - Get all addresses for a customer
-
getStates(
{required String countryCode}) → Future< List< CountryState> > - Get states/provinces for a country
-
initialize(
) → void -
Initialize the repository
inherited
-
lookupPostalCode(
{required String postalCode, required String countryCode}) → Future< PostalCode?> - Look up postal code information
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
saveCustomerAddress(
{required String customerId, required Address address}) → Future< Address> - Save a new address for a customer
-
searchAddresses(
{required String query, String? countryCode, int limit = 10}) → Future< List< Address> > - Search for addresses based on a partial query string
-
setDefaultAddress(
{required String customerId, required String addressId}) → Future< Address> - Set an address as the default for a customer
-
toString(
) → String -
A string representation of this object.
inherited
-
updateCustomerAddress(
{required String customerId, required String addressId, required Address address}) → Future< Address> - Update an existing customer address
-
validatePostalCode(
{required String postalCode, required String countryCode}) → Future< bool> - Validate a postal code format
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited