LocationSearchWidget constructor
const
LocationSearchWidget({
- Key? key,
- required void onPicked(
- LocationData data
- required UserAgent userAgent,
- void onError()?,
- String? language = 'en',
- List<
String> ? countryCodes, - Color? searchBarBackgroundColor,
- Color searchBarTextColor = Colors.black87,
- String searchBarHintText = 'Search location',
- String currentPositionButtonText = 'Use current location',
- Color searchBarHintColor = Colors.black87,
- bool lightAddress = false,
- Color iconColor = Colors.grey,
- Mode mode = Mode.fullscreen,
- int historyMaxLength = 5,
- bool showAddressNumberOption = true,
- String addressNumberButtonText = "Add number",
- IconData? addressNumberButtonIcon = Icons.add,
- Color? addressNumberButtonColor,
- Color? addressNumberButtonBackground,
- double addressNumberButtonTextSize = 12,
- Widget upperWidget(
- BuildContext context
- String? googlePlacesSearchKey,
- 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();