LocationField class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- LocationField
Constructors
-
LocationField({Key? key, String? label, LocationData? value, ValueChanged<
LocationData?> ? onChanged, FormFieldValidator<LocationData> ? validator, InputDecoration? decoration, MapProvider mapProvider = MapProvider.openStreetMap, String? apiKey, double? initialZoom = 15.0, LocationData? initialLocation, bool showCurrentLocationButton = true, bool enableLocationSearch = true, bool enableMapSelection = true, String? searchHintText, bool showSearchSuggestions = true, int maxSearchSuggestions = 5, Future<List< customSearchProvider(String query)?, LocationType locationType = LocationType.all, List<LocationData> >String> ? restrictToCountries, double? searchRadius, DistanceUnit searchRadiusUnit = DistanceUnit.kilometers, LocationData? searchBias, double mapHeight = 200.0, BorderRadius? mapBorderRadius, bool showFullScreenMapButton = true, Widget? mapLoadingWidget, Widget? locationIcon, Color? markerColor, bool enableZoomControls = true, bool enableMapTypeSelector = false, bool showFullAddress = true, List<String> addressComponents = const ['address', 'city', 'state', 'country'], String customAddressFormatter(LocationData)?, bool showCoordinates = false, bool showDistance = false, LocationData? distanceReference, DistanceUnit distanceUnit = DistanceUnit.kilometers, bool requestLocationPermission = true, String? locationPermissionMessage, LocationData? fallbackLocation, LocationAccuracy locationAccuracy = LocationAccuracy.high, Duration? locationTimeout, bool enableNearbyPlaces = false, double nearbyRadius = 1.0, List<String> ? nearbyPlaceTypes, bool enableAutocomplete = true, bool enableReverseGeocoding = true, bool enableLocationHistory = false, int maxLocationHistory = 10, bool enableFavoriteLocations = false, List<LocationData> ? favoriteLocations, ValueChanged<List< ? onFavoriteLocationsChanged, bool enableOfflineSupport = false, Duration? cacheExpiration, bool preloadNearbyTiles = false, bool enableMultiSelection = false, List<LocationData> >LocationData> ? selectedLocations, ValueChanged<List< ? onMultiSelectionChanged, int? maxSelectedLocations, LocationBounds? allowedBounds, double? minAccuracy, List<LocationData> >String> ? excludedPlaceTypes, bool requireAddress = false, VoidCallback? onLocationLoading, VoidCallback? onLocationLoadingComplete, dynamic onLocationError(String error)?, dynamic onLocationSelected(LocationData location)?, dynamic onLocationFavorited(LocationData location)?}) -
const
Properties
-
addressComponents
→ List<
String> -
final
- allowedBounds → LocationBounds?
-
final
- apiKey → String?
-
final
- cacheExpiration → Duration?
-
final
- customAddressFormatter → String Function(LocationData)?
-
final
-
customSearchProvider
→ Future<
List< Function(String query)?LocationData> > -
final
- decoration → InputDecoration?
-
final
- distanceReference → LocationData?
-
final
- distanceUnit → DistanceUnit
-
final
- enableAutocomplete → bool
-
final
- enableFavoriteLocations → bool
-
final
- enableLocationHistory → bool
-
final
- enableLocationSearch → bool
-
final
- enableMapSelection → bool
-
final
- enableMapTypeSelector → bool
-
final
- enableMultiSelection → bool
-
final
- enableNearbyPlaces → bool
-
final
- enableOfflineSupport → bool
-
final
- enableReverseGeocoding → bool
-
final
- enableZoomControls → bool
-
final
-
excludedPlaceTypes
→ List<
String> ? -
final
- fallbackLocation → LocationData?
-
final
-
favoriteLocations
→ List<
LocationData> ? -
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- initialLocation → LocationData?
-
final
- initialZoom → double?
-
final
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
- label → String?
-
final
- locationAccuracy → LocationAccuracy
-
final
- locationIcon → Widget?
-
final
- locationPermissionMessage → String?
-
final
- locationTimeout → Duration?
-
final
- locationType → LocationType
-
final
- mapBorderRadius → BorderRadius?
-
final
- mapHeight → double
-
final
- mapLoadingWidget → Widget?
-
final
- mapProvider → MapProvider
-
final
- markerColor → Color?
-
final
- maxLocationHistory → int
-
final
- maxSearchSuggestions → int
-
final
- maxSelectedLocations → int?
-
final
- minAccuracy → double?
-
final
-
nearbyPlaceTypes
→ List<
String> ? -
final
- nearbyRadius → double
-
final
-
onChanged
→ ValueChanged<
LocationData?> ? -
final
-
onFavoriteLocationsChanged
→ ValueChanged<
List< ?LocationData> > -
final
- onLocationError → dynamic Function(String error)?
-
final
- onLocationFavorited → dynamic Function(LocationData location)?
-
final
- onLocationLoading → VoidCallback?
-
final
- onLocationLoadingComplete → VoidCallback?
-
final
- onLocationSelected → dynamic Function(LocationData location)?
-
final
-
onMultiSelectionChanged
→ ValueChanged<
List< ?LocationData> > -
final
- preloadNearbyTiles → bool
-
final
- requestLocationPermission → bool
-
final
- requireAddress → bool
-
final
-
restrictToCountries
→ List<
String> ? -
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- searchBias → LocationData?
-
final
- searchHintText → String?
-
final
- searchRadius → double?
-
final
- searchRadiusUnit → DistanceUnit
-
final
-
selectedLocations
→ List<
LocationData> ? -
final
- showCoordinates → bool
-
final
- showCurrentLocationButton → bool
-
final
- showDistance → bool
-
final
- showFullAddress → bool
-
final
- showFullScreenMapButton → bool
-
final
- showSearchSuggestions → bool
-
final
-
validator
→ FormFieldValidator<
LocationData> ? -
final
- value → LocationData?
-
final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< LocationField> -
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