CustomPlaceAutoComplete constructor

const CustomPlaceAutoComplete({
  1. Key? key,
  2. required String apiKey,
  3. String? language,
  4. EdgeInsetsGeometry topCardMargin = const EdgeInsets.all(8),
  5. Color? topCardColor,
  6. ShapeBorder topCardShape = const RoundedRectangleBorder(borderRadius: BorderRadius.all(Radius.circular(8))),
  7. BorderRadiusGeometry borderRadius = const BorderRadius.all(Radius.circular(8)),
  8. String searchHintText = "Start typing to search",
  9. bool hideBackButton = false,
  10. Widget? backButton,
  11. Client? placesHttpClient,
  12. Map<String, String>? placesApiHeaders,
  13. String? placesBaseUrl,
  14. String? sessionToken,
  15. Offset? offset,
  16. Location? origin,
  17. Location? location,
  18. num? radius,
  19. String? region,
  20. List<String> fields = const [],
  21. List<String> types = const [],
  22. List<Component> components = const [],
  23. bool strictbounds = false,
  24. TextEditingController? searchController,
  25. required bool mounted,
  26. void onGetDetailsByPlaceId(
    1. PlacesDetailsResponse?, {
    2. Prediction? searchedPlace,
    })?,
  27. void onSelected(
    1. Prediction
    )?,
  28. bool showClearButton = true,
  29. Widget? suffixIcon,
  30. Widget? prefixIcon,
  31. Widget? trailingIcon,
  32. Prediction? initialValue,
  33. String? validator(
    1. Prediction?
    )?,
  34. Widget itemBuilder(
    1. BuildContext,
    2. Prediction
    )?,
  35. Duration animationDuration = const Duration(milliseconds: 500),
  36. bool autoFlipDirection = false,
  37. TextEditingController? controller,
  38. Duration debounceDuration = const Duration(milliseconds: 300),
  39. VerticalDirection direction = VerticalDirection.down,
  40. Widget errorBuilder(
    1. BuildContext,
    2. Object?
    )?,
  41. bool hideOnEmpty = false,
  42. bool hideOnError = false,
  43. bool hideOnLoading = false,
  44. WidgetBuilder? loadingBuilder,
  45. ScrollController? scrollController,
  46. InputDecoration? decoration,
  47. dynamic valueTransformer(
    1. Prediction?
    )?,
  48. bool enabled = true,
  49. AutovalidateMode autovalidateMode = AutovalidateMode.disabled,
  50. void onChanged(
    1. Prediction?
    )?,
  51. void onReset()?,
  52. void onSaved(
    1. Prediction?
    )?,
  53. FocusNode? focusNode,
  54. EdgeInsets minimum = EdgeInsets.zero,
  55. bool bottom = true,
  56. bool left = true,
  57. bool maintainBottomViewPadding = false,
  58. bool right = true,
  59. bool top = true,
  60. int minCharsForSuggestions = 3,
  61. Widget transitionBuilder(
    1. BuildContext,
    2. Animation<double>,
    3. Widget
    )?,
  62. bool autoFlipListDirection = true,
  63. double autoFlipMinHeight = 64.0,
  64. BoxConstraints? constraints,
  65. TextField? customTextField,
  66. Widget decorationBuilder(
    1. BuildContext,
    2. Widget
    )?,
  67. Widget emptyBuilder(
    1. BuildContext
    )?,
  68. bool hideKeyboardOnDrag = false,
  69. bool hideOnSelect = true,
  70. bool hideOnUnfocus = true,
  71. bool hideWithKeyboard = true,
  72. Widget itemSeparatorBuilder(
    1. BuildContext,
    2. int
    )?,
  73. Widget listBuilder(
    1. BuildContext,
    2. List<Widget>
    )?,
  74. bool retainOnLoading = true,
  75. bool showOnFocus = true,
  76. SuggestionsController<Prediction>? suggestionsController,
  77. num? offsetParameter,
  78. dynamic onTextChange(
    1. String?
    )?,
})

Implementation

const CustomPlaceAutoComplete({
  super.key,
  required this.apiKey,
  this.language,
  this.topCardMargin = const EdgeInsets.all(8),
  this.topCardColor,
  this.topCardShape = const RoundedRectangleBorder(
    borderRadius: BorderRadius.all(Radius.circular(8)),
  ),
  this.borderRadius = const BorderRadius.all(Radius.circular(8)),
  this.searchHintText = "Start typing to search",
  this.hideBackButton = false,
  this.backButton,
  this.placesHttpClient,
  this.placesApiHeaders,
  this.placesBaseUrl,
  this.sessionToken,
  this.offset,
  this.origin,
  this.location,
  this.radius,
  this.region,
  this.fields = const [],
  this.types = const [],
  this.components = const [],
  this.strictbounds = false,
  this.searchController,
  required this.mounted,
  this.onGetDetailsByPlaceId,
  this.onSelected,
  this.showClearButton = true,
  this.suffixIcon,
  this.prefixIcon,
  this.trailingIcon,
  this.initialValue,
  this.validator,
  this.itemBuilder,
  this.animationDuration = const Duration(milliseconds: 500),
  this.autoFlipDirection = false,
  this.controller,
  this.debounceDuration = const Duration(milliseconds: 300),
  this.direction = VerticalDirection.down,
  this.errorBuilder,
  this.hideOnEmpty = false,
  this.hideOnError = false,
  this.hideOnLoading = false,
  this.loadingBuilder,
  this.scrollController,
  this.decoration,
  this.valueTransformer,
  this.enabled = true,
  this.autovalidateMode = AutovalidateMode.disabled,
  this.onChanged,
  this.onReset,
  this.onSaved,
  this.focusNode,
  this.minimum = EdgeInsets.zero,
  this.bottom = true,
  this.left = true,
  this.maintainBottomViewPadding = false,
  this.right = true,
  this.top = true,
  this.minCharsForSuggestions = 3,
  this.transitionBuilder,
  this.autoFlipListDirection = true,
  this.autoFlipMinHeight = 64.0,
  this.constraints,
  this.customTextField,
  this.decorationBuilder,
  this.emptyBuilder,
  this.hideKeyboardOnDrag = false,
  this.hideOnSelect = true,
  this.hideOnUnfocus = true,
  this.hideWithKeyboard = true,
  this.itemSeparatorBuilder,
  this.listBuilder,
  this.retainOnLoading = true,
  this.showOnFocus = true,
  this.suggestionsController,
  this.offsetParameter,
  this.onTextChange,
});