LocationSearchWidget constructor

const LocationSearchWidget({
  1. Key? key,
  2. required void onPicked(
    1. LocationData data
    )?,
  3. required UserAgent userAgent,
  4. void onError(
    1. Exception e
    )?,
  5. String? language = 'en',
  6. List<String>? countryCodes,
  7. Color? searchBarBackgroundColor,
  8. Color searchBarTextColor = Colors.black87,
  9. String searchBarHintText = 'Search location',
  10. String currentPositionButtonText = 'Use current location',
  11. Color searchBarHintColor = Colors.black87,
  12. bool lightAddress = false,
  13. Color iconColor = Colors.grey,
  14. Mode mode = Mode.fullscreen,
  15. int historyMaxLength = 5,
  16. bool showAddressNumberOption = true,
  17. String addressNumberButtonText = "Add number",
  18. IconData? addressNumberButtonIcon = Icons.add,
  19. Color? addressNumberButtonColor,
  20. Color? addressNumberButtonBackground,
  21. double addressNumberButtonTextSize = 12,
  22. Widget upperWidget(
    1. BuildContext context
    )?,
  23. String? googlePlacesSearchKey,
  24. Widget? loadingWidget,
})

Implementation

const LocationSearchWidget({
  super.key,
  required this.onPicked,
  required this.userAgent,
  this.onError,
  this.language = 'en',
  this.countryCodes,
  this.searchBarBackgroundColor,
  this.searchBarTextColor = Colors.black87,
  this.searchBarHintText = 'Search location',
  this.currentPositionButtonText = 'Use current location',
  this.searchBarHintColor = Colors.black87,
  this.lightAddress = false,
  this.iconColor = Colors.grey,
  this.mode = Mode.fullscreen,
  this.historyMaxLength = 5,
  this.showAddressNumberOption = true,
  this.addressNumberButtonText = "Add number",
  this.addressNumberButtonIcon = Icons.add,
  this.addressNumberButtonColor,
  this.addressNumberButtonBackground,
  this.addressNumberButtonTextSize = 12,
  this.upperWidget,
  this.googlePlacesSearchKey,
  Widget? loadingWidget,
}) : loadingWidget = loadingWidget ?? const CircularProgressIndicator();