AddressAutocompleteTextField constructor
const
AddressAutocompleteTextField({
- Key? key,
- required String mapsApiKey,
- TextEditingController? controller,
- FocusNode? focusNode,
- String? initialValue,
- String prepareQuery(
- String address
- void onClearClick()?,
- void onInitialSuggestionClick(
- Suggestion suggestion
- void onSuggestionClick(
- Place place
- void onFinishedEditingWithNoSuggestion(
- String text
- String? onSuggestionClickGetTextToUseForControl(
- Place place
- Widget buildItem()?,
- Color? hoverColor,
- Color? selectionColor,
- Icon? clearButton,
- BoxDecoration? suggestionsOverlayDecoration,
- InputDecoration? decoration,
- double? elevation,
- double overlayOffset = 4,
- bool showGoogleTradeMark = false,
- bool? postalCodeLookup,
- AutoCompleteType? type,
- List<
AutoCompleteType> ? types, - int debounceTime = 600,
- String? componentCountry,
- String? language,
- TextInputType? keyboardType,
- TextCapitalization textCapitalization = TextCapitalization.none,
- TextInputAction? textInputAction,
- TextStyle? style,
- StrutStyle? strutStyle,
- TextAlign textAlign = TextAlign.start,
- TextAlignVertical? textAlignVertical,
- TextDirection? textDirection,
- bool autofocus = false,
- bool readOnly = false,
- bool? showCursor,
- int? maxLines = 1,
- int? minLines,
- bool expands = false,
- int? maxLength,
- MaxLengthEnforcement? maxLengthEnforcement,
- ValueChanged<
String> ? onChanged,
Implementation
const AddressAutocompleteTextField({
super.key,
required this.mapsApiKey,
this.controller,
this.focusNode,
this.initialValue,
this.prepareQuery,
this.onClearClick,
this.onInitialSuggestionClick,
this.onSuggestionClick,
this.onFinishedEditingWithNoSuggestion,
this.onSuggestionClickGetTextToUseForControl,
this.buildItem,
this.hoverColor,
this.selectionColor,
this.clearButton,
this.suggestionsOverlayDecoration,
this.decoration,
this.elevation,
this.overlayOffset = 4,
this.showGoogleTradeMark = false,
this.postalCodeLookup,
this.type,
this.types,
this.debounceTime = 600,
this.componentCountry,
this.language,
// inherited TextField arguments
this.keyboardType,
this.textCapitalization = TextCapitalization.none,
this.textInputAction,
this.style,
this.strutStyle,
this.textAlign = TextAlign.start,
this.textAlignVertical,
this.textDirection,
this.autofocus = false,
this.readOnly = false,
this.showCursor,
this.maxLines = 1,
this.minLines,
this.expands = false,
this.maxLength,
this.maxLengthEnforcement,
this.onChanged,
}) : assert(
(postalCodeLookup == true && type == null && types == null) ||
(postalCodeLookup == false && type == null && types == null) ||
(postalCodeLookup == null && type == null && types == null) ||
(postalCodeLookup == null && type != null && types == null) ||
(postalCodeLookup == null && type == null && types != null),
'You can only supply value for [type], [types] (or deprecated `postalCodeLookup`). No combinations allowed');