MapZoneManager class

Widget to display a map with the ability to create zones and manage markers.

Inheritance

Constructors

MapZoneManager({Key? key, CameraPosition? initialCameraPosition, String? markerIcon, String? googleMapApiKey, bool multiZone = true, bool showLocationSearch = false, bool showZoneSearch = true, bool showAddButton = true, bool showCloseButton = true, bool showDeleteButton = true, bool viewOnly = false, Widget? addButtonWidget, Widget? deleteButtonWidget, Widget? closeButtonWidget, List<Zone>? zones, dynamic onLocationSuggestionSelected(LocationPrediction)?, dynamic onZoneSuggestionSelected(Zone)?, dynamic onZoneAdded(Zone)?, dynamic onError(String message)?, MapStyle mapStyle = MapStyle.standard, MapZoneManagerController? mapZoneManagerController, int minimumCoordinatesForAdding = 2, Color defaultZoneColor = Colors.yellow, Color defaultBorderColor = Colors.black, int defaultBorderWidth = 2, Color currentZoneColor = Colors.red, Color currentBorderColor = Colors.black, int currentBorderWidth = 2, void onCoordinatesAdded(LatLng)?, void onLongPress(LatLng)?, bool zoomControlsEnabled = true, bool zoomGesturesEnabled = true, bool myLocationEnabled = false, bool myLocationButtonEnabled = true})
Widget to display a map with the ability to create zones and manage markers.
const

Properties

addButtonWidget → Widget?
Custom widget to replace the default add button.
final
closeButtonWidget → Widget?
Custom widget to replace the default delete button.
final
currentBorderColor → Color
The color for the current zone's border.
final
currentBorderWidth → int
The width for the current zone's border.
final
currentZoneColor → Color
The color for the current zone being created.
final
defaultBorderColor → Color
The default color for the zone's border.
final
defaultBorderWidth → int
The default width for the zone's border.
final
defaultZoneColor → Color
The default color for the zone's fill.
final
deleteButtonWidget → Widget?
Custom widget to replace the default delete button.
final
googleMapApiKey → String?
google map api key for search location
final
hashCode → int
The hash code for this object.
no setterinherited
initialCameraPosition → CameraPosition?
The initial camera position for the map.
final
key → Key?
Controls how one widget replaces another widget in the tree.
finalinherited
mapStyle → MapStyle
The style to be applied to the map.
final
mapZoneManagerController → MapZoneManagerController?
The controller to manage map zones.
final
markerIcon → String?
The marker icon to be used on the map.
final
minimumCoordinatesForAdding → int
Minimum number of coordinates required to create a zone.
final
multiZone → bool
Whether multiple zones can be added on the map.
final
myLocationButtonEnabled → bool
Whether the "My Location" button is enabled on the map.
final
myLocationEnabled → bool
Whether the user's current location should be displayed on the map.
final
onCoordinatesAdded → void Function(LatLng)?
Callback function triggered when the map is tapped.
final
onError → dynamic Function(String message)?
final
onLocationSuggestionSelected → dynamic Function(LocationPrediction)?
Callback function triggered when a location is selected from autofill suggestions
final
onLongPress → void Function(LatLng)?
Callback function triggered when the map is long-pressed.
final
onZoneAdded → dynamic Function(Zone)?
Callback function triggered when a new zone is added.
final
onZoneSuggestionSelected → dynamic Function(Zone)?
Callback function triggered when a zone is selected from autofill suggestions
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
showAddButton → bool
Whether the add zone button should be shown.
final
showCloseButton → bool
Whether the close zone button should be shown.
final
showDeleteButton → bool
Whether the delete button should be shown.
final
showLocationSearch → bool
Whether the location search filed should be shown.
final
showZoneSearch → bool
Whether the zone search filed should be shown.
final
viewOnly → bool
Whether the map is in view-only mode.
final
zones → List<Zone>?
List of zones to be displayed on the map initially.
final
zoomControlsEnabled → bool
Whether zoom controls are enabled on the map.
final
zoomGesturesEnabled → bool
Whether zoom gestures are enabled on the map.
final

Methods

createElement() → StatefulElement
Creates a StatefulElement to manage this widget's location in the tree.
inherited
createState() → State<MapZoneManager>
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