PlacePickerState class
Place picker state
- Inheritance
-
- Object
- State<
PlacePicker> - PlacePickerState
Constructors
Properties
-
appBarKey
↔ GlobalKey<
State< StatefulWidget> > -
getter/setter pair
- context → BuildContext
-
The location in the tree where this widget builds.
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasSearchTerm ↔ bool
-
getter/setter pair
- locationResult ↔ LocationResult?
-
Result returned after user completes selection
getter/setter pair
-
mapController
→ Completer<
GoogleMapController> -
final
-
markers
→ Set<
Marker> -
Indicator for the selected location
final
- mounted → bool
-
Whether this State object is currently in a tree.
no setterinherited
-
nearbyPlaces
↔ List<
NearbyPlace> -
getter/setter pair
- overlayEntry ↔ OverlayEntry?
-
Overlay to display autocomplete suggestions
getter/setter pair
- previousSearchTerm ↔ String
-
getter/setter pair
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- sessionToken ↔ String
-
Session token required for autocomplete API call
getter/setter pair
- widget → PlacePicker
-
The current configuration.
no setterinherited
Methods
-
activate(
) → void -
Called when this object is reinserted into the tree after having been
removed via deactivate.
inherited
-
autoCompleteSearch(
String place) → void -
Fetches the place autocomplete list with the query
place
. -
build(
BuildContext context) → Widget -
Describes the part of the user interface represented by this widget.
override
-
clearOverlay(
) → void - Hides the autocomplete overlay
-
deactivate(
) → void -
Called when this object is removed from the tree.
inherited
-
debugFillProperties(
DiagnosticPropertiesBuilder properties) → void -
Add additional properties associated with the node.
inherited
-
decodeAndSelectPlace(
String placeId) → void - To navigate to the selected place from the autocomplete list to the map, the lat,lng is required. This method fetches the lat,lng of the place and proceeds to moving the map to that location.
-
didChangeDependencies(
) → void -
Called when a dependency of this State object changes.
inherited
-
didUpdateWidget(
covariant PlacePicker oldWidget) → void -
Called whenever the widget configuration changes.
inherited
-
displayAutoCompleteSuggestions(
List< RichSuggestion> suggestions) → void - Display autocomplete suggestions with the overlay.
-
dispose(
) → void -
Called when this object is removed from the tree permanently.
override
-
getLocationName(
) → String - Utility function to get clean readable name of a location. First checks for a human-readable name from the nearby list. This helps in the cases that the user selects from the nearby list (and expects to see that as a result, instead of road name). If no name is found from the nearby list, then the road name returned is used instead.
-
getNearbyPlaces(
LatLng latLng) → void - Fetches and updates the nearby places to the provided lat,lng
-
initState(
) → void -
Called when this object is inserted into the tree.
override
-
moveToCurrentUserLocation(
) → void -
moveToLocation(
LatLng latLng) → void - Moves the camera to the provided location and updates other UI features to match the location.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
onMapCreated(
GoogleMapController controller) → void -
reassemble(
) → void -
Called whenever the application is reassembled during debugging, for
example during hot reload.
inherited
-
reverseGeocodeLatLng(
LatLng latLng) → void - This method gets the human readable name of the location. Mostly appears to be the road name and the locality.
-
searchPlace(
String place) → void - Begins the search process by displaying a "wait" overlay then proceeds to fetch the autocomplete list. The bottom "dialog" is hidden so as to give more room and better experience for the autocomplete list overlay.
-
setMarker(
LatLng latLng) → void - Moves the marker to the indicated lat,lng
-
setState(
VoidCallback fn) → void -
Notify the framework that the internal state of this object has changed.
override
-
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
-
toStringShort(
) → String -
A brief description of this object, usually just the runtimeType and the
hashCode.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited