NeshanLocationPickerConfig class

Configuration for timing and behavior settings of the Neshan Location Picker.

This class contains only timing-related configuration. API keys and map configuration are passed directly to the NeshanLocationPicker widget.

Usage Example

NeshanLocationPicker(
  mapKey: 'your-map-api-key',
  reverseGeocodingApiKey: 'your-geocoding-key',
  searchApiKey: 'your-search-key', // Enables search
  mapConfig: NeshanMapConfig(
    initialCenter: LatLng(35.6892, 51.3890),
    initialZoom: 15.0,
  ),
  locationPickerConfig: NeshanLocationPickerConfig(
    geocodingDebounce: Duration(milliseconds: 500),
    searchDebounce: Duration(milliseconds: 400),
  ),
  onLocationAccepted: (position, address) {},
)

Default Values

  • geocodingDebounce: Duration(milliseconds: 300)
  • searchDebounce: Duration(milliseconds: 300)

Feature Enablement

Features are automatically enabled/disabled based on API key availability:

  • Reverse Geocoding: Enabled when reverseGeocodingApiKey is provided
  • Search: Enabled when searchApiKey is provided

Constructors

NeshanLocationPickerConfig({Duration geocodingDebounce = const Duration(milliseconds: 300), Duration searchDebounce = const Duration(milliseconds: 300)})
Creates a location picker configuration.
const

Properties

geocodingDebounce Duration
Debounce duration for reverse-geocoding API calls.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
searchDebounce Duration
Debounce duration for search input.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

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