LocationPickerPlusUnifiedWidget constructor

const LocationPickerPlusUnifiedWidget({
  1. Key? key,
  2. dynamic onLocationSelected(
    1. LocationResult?
    )?,
  3. LocationPickerMode mode = LocationPickerMode.all,
  4. LocationPickerTheme? theme,
  5. String? googlePlacesApiKey,
  6. String? initialSearchText,
  7. LocationResult? initialLocation,
  8. String? country,
  9. List<String> placesTypes = const [],
  10. String placesHintText = 'Search for a place...',
  11. bool useDropdownsForCountryState = true,
  12. String addressLabel = 'Address',
  13. String cityLabel = 'City',
  14. String stateLabel = 'State/Province',
  15. String countryLabel = 'Country',
  16. String postalCodeLabel = 'Postal Code',
  17. List<String>? allowedCountries,
  18. bool lockFieldsForGooglePlaces = true,
  19. String currentLocationButtonText = 'Use My Location',
  20. bool showCoordinates = true,
  21. bool autoDetectOnInit = false,
  22. String searchTabLabel = 'Search',
  23. String gpsTabLabel = 'GPS',
  24. String manualTabLabel = 'Manual',
})

Implementation

const LocationPickerPlusUnifiedWidget({
  super.key,
  this.onLocationSelected,
  this.mode = LocationPickerMode.all,
  this.theme,
  this.googlePlacesApiKey,
  this.initialSearchText,
  this.initialLocation,

  // Google Places
  this.country,
  this.placesTypes = const [],
  this.placesHintText = 'Search for a place...',

  // Manual entry
  this.useDropdownsForCountryState = true,
  this.addressLabel = 'Address',
  this.cityLabel = 'City',
  this.stateLabel = 'State/Province',
  this.countryLabel = 'Country',
  this.postalCodeLabel = 'Postal Code',
  this.allowedCountries,
  this.lockFieldsForGooglePlaces = true,

  // Current location
  this.currentLocationButtonText = 'Use My Location',
  this.showCoordinates = true,
  this.autoDetectOnInit = false,

  // UI
  this.searchTabLabel = 'Search',
  this.gpsTabLabel = 'GPS',
  this.manualTabLabel = 'Manual',
});