EnhancedGooglePlacesWidget constructor
const
EnhancedGooglePlacesWidget({
- Key? key,
- dynamic onLocationSelected()?,
- dynamic onTextChanged()?,
- dynamic onSuggestionsChanged()?,
- String? apiKey,
- String? initialValue,
- String? country,
- List<
String> types = const [], - bool enabled = true,
- TextEditingController? controller,
- InputDecoration? inputDecoration,
- TextStyle? textStyle,
- TextStyle? hintStyle,
- String? hintText = 'Search for a place...',
- Widget? prefixIcon,
- Widget? suffixIcon,
- Widget? loadingWidget,
- Widget? clearIcon,
- EdgeInsetsGeometry? contentPadding,
- BorderRadius? borderRadius,
- Border? border,
- Border? focusedBorder,
- Border? errorBorder,
- Color? fillColor,
- bool? filled,
- double? borderWidth,
- Color? borderColor,
- Color? focusedBorderColor,
- Color? errorBorderColor,
- double? suggestionHeight,
- double? maxSuggestionHeight = 300,
- BorderRadius? suggestionBorderRadius,
- Color? suggestionBackgroundColor,
- Color? suggestionHoverColor,
- Color? suggestionSelectedColor,
- double? suggestionElevation = 4,
- EdgeInsetsGeometry? suggestionPadding,
- TextStyle? suggestionTextStyle,
- TextStyle? suggestionSubtextStyle,
- Widget customSuggestionBuilder()?,
- Widget? noResultsWidget,
- Widget? errorWidget,
- Offset? suggestionOffset,
- double? suggestionSpacing = 4,
- Widget? locationIcon,
- double? iconSize = 20,
- Color? iconColor,
- EdgeInsetsGeometry? iconPadding,
- Duration? debounceDelay = const Duration(milliseconds: 300),
- Duration? animationDuration = const Duration(milliseconds: 200),
- Curve? animationCurve = Curves.easeInOut,
- bool showAnimations = true,
- bool autoFocus = false,
- bool showClearButton = true,
- bool showLoadingIndicator = true,
- double? width,
- double? height,
- EdgeInsetsGeometry? margin,
- AlignmentGeometry? alignment,
- String? validator()?,
- Widget errorBuilder()?,
- bool showInlineErrors = true,
- String? semanticsLabel,
- String? semanticsHint,
Implementation
const EnhancedGooglePlacesWidget({
super.key,
// Core
this.onLocationSelected,
this.onTextChanged,
this.onSuggestionsChanged,
this.apiKey,
this.initialValue,
this.country,
this.types = const [],
this.enabled = true,
this.controller,
// Input customization
this.inputDecoration,
this.textStyle,
this.hintStyle,
this.hintText = 'Search for a place...',
this.prefixIcon,
this.suffixIcon,
this.loadingWidget,
this.clearIcon,
this.contentPadding,
this.borderRadius,
this.border,
this.focusedBorder,
this.errorBorder,
this.fillColor,
this.filled,
this.borderWidth,
this.borderColor,
this.focusedBorderColor,
this.errorBorderColor,
// Suggestions customization
this.suggestionHeight,
this.maxSuggestionHeight = 300,
this.suggestionBorderRadius,
this.suggestionBackgroundColor,
this.suggestionHoverColor,
this.suggestionSelectedColor,
this.suggestionElevation = 4,
this.suggestionPadding,
this.suggestionTextStyle,
this.suggestionSubtextStyle,
this.customSuggestionBuilder,
this.noResultsWidget,
this.errorWidget,
this.suggestionOffset,
this.suggestionSpacing = 4,
// Icons
this.locationIcon,
this.iconSize = 20,
this.iconColor,
this.iconPadding,
// Animation
this.debounceDelay = const Duration(milliseconds: 300),
this.animationDuration = const Duration(milliseconds: 200),
this.animationCurve = Curves.easeInOut,
this.showAnimations = true,
this.autoFocus = false,
this.showClearButton = true,
this.showLoadingIndicator = true,
// Layout
this.width,
this.height,
this.margin,
this.alignment,
// Error handling
this.validator,
this.errorBuilder,
this.showInlineErrors = true,
// Accessibility
this.semanticsLabel,
this.semanticsHint,
});