SearchLocation class

Inheritance

Constructors

SearchLocation({required String apiKey, String placeholder = 'Search', IconData icon = Icons.search, bool hasClearButton = true, IconData clearIcon = Icons.clear, Color iconColor = Colors.blue, void onSelected(Place place)?, void onSearch(Place place)?, void onChangeText(String value)?, void onClearIconPress()?, String language = 'en', String? country, LatLng? location, int? radius, bool strictBounds = false, PlaceType? placeType, bool darkMode = false, Key? key})

Properties

apiKey → String
API Key of the Google Maps API.
final
clearIcon → IconData
The icon to show indicating the "clear textfield" button
final
country → String?
set search only work for a country
final
darkMode → bool
Enables Dark Mode when set to true. Default value is false.
final
hasClearButton → bool
Makes available "clear textfield" button when the user is writing.
final
hashCode → int
The hash code for this object.
no setterinherited
icon → IconData
The initial icon to show in the search box
final
iconColor → Color
The color of the icon to show in the search box
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
language → String
Language used for the autocompletion.
final
location → LatLng?
The point around which you wish to retrieve place information.
final
onChangeText → void Function(String value)?
final
onClearIconPress → void Function()?
final
onSearch → void Function(Place place)?
The callback that is called when the user taps on the search icon.
final
onSelected → void Function(Place place)?
The callback that is called when one Place is selected by the user.
final
placeholder → String
Placeholder text to show when the user has not entered any input.
final
placeType → PlaceType?
Place type to filter the search. This is a tool that can be used if you only want to search for a specific type of location. If this no place type is provided, all types of places are searched. For more info on location types, check https://developers.google.com/places/web-service/autocomplete?#place_types
final
radius → int?
The distance (in meters) within which to return place results. Note that setting a radius biases results to the indicated area, but may not fully restrict results to the specified area.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
strictBounds → bool
Returns only those places that are strictly within the region defined by location and radius. This is a restriction, rather than a bias, meaning that results outside this region will not be returned even if they match the user input.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → _SearchLocationState
Creates the mutable state for this widget at a given location in the tree.
override
debugDescribeChildren() → List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children.
inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node.
inherited
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toDiagnosticsNode({String? name, DiagnosticsTreeStyle? style}) → DiagnosticsNode
Returns a debug representation of the object that is used by debugging tools and by DiagnosticsNode.toStringDeep.
inherited
toString({DiagnosticLevel minLevel = DiagnosticLevel.info}) → String
A string representation of this object.
inherited
toStringDeep({String prefixLineOne = '', String? prefixOtherLines, DiagnosticLevel minLevel = DiagnosticLevel.debug, int wrapWidth = 65}) → String
Returns a string representation of this node and its descendants.
inherited
toStringShallow({String joiner = ', ', DiagnosticLevel minLevel = DiagnosticLevel.debug}) → String
Returns a one-line detailed description of the object.
inherited
toStringShort() → String
A short, textual description of this widget.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited