Address Autocomplete Controller
class AddressAutocompleteController(debounceMillis: Long = 80, search: suspend (query: String, countryCode: String?) -> List<AddressSuggestion> = { query, country ->
AddressSearchService.shared.suggest(query, country)
}, retrieveAddress: suspend (AddressSuggestion) -> FrameObjects.BillingAddress? = { suggestion ->
AddressSearchService.shared.retrieve(suggestion)
})
Drives the suggestion list behind an address field.
Autocomplete never blocks manual entry. Every failure path — no token, Mapbox unreachable, an empty result set — clears the suggestions and reports nothing, so a user who is typing simply sees no list rather than an error.
Constructors
Link copied to clipboard
constructor(debounceMillis: Long = 80, search: suspend (query: String, countryCode: String?) -> List<AddressSuggestion> = { query, country ->
AddressSearchService.shared.suggest(query, country)
}, retrieveAddress: suspend (AddressSuggestion) -> FrameObjects.BillingAddress? = { suggestion ->
AddressSearchService.shared.retrieve(suggestion)
})
Types
Link copied to clipboard
object Companion
Tuning constants shared by every AddressAutocompleteController.
Properties
Link copied to clipboard
The current suggestion list. Empty while the field is unfocused, below MINIMUM_QUERY_LENGTH, or between keystrokes and a debounced search resolving.