ThemedMapToolbar class
- Inheritance
-
- Object
- DiagnosticableTree
- Widget
- StatefulWidget
- ThemedMapToolbar
Constructors
-
ThemedMapToolbar({Key? key, List<
MapLayer> layers = const [], MapLayer? selectedLayer, VoidCallback? onZoomIn, VoidCallback? onZoomOut, bool zoomInDisabled = false, bool zoomOutDisabled = false, void onLayerChanged(MapLayer?)?, Alignment position = Alignment.bottomRight, ThemedMapToolbarFlow flow = ThemedMapToolbarFlow.vertical, List<ThemedMapButton> additionalButtons = const [], String zoomInLabelText = 'Zoom In', String zoomOutLabelText = 'Zoom Out', String changeLayerLabelText = 'Change Layer', String saveLabelText = 'Save', String cancelLabelText = 'Cancel', bool enableGoogleStreetView = false, ThemedMapController? controller, MapController? mapController, GlobalKey<State< ? mapKey})StatefulWidget> > -
ThemedMapToolbar is a widget that builds a toolbar for the map.
The position of the toolbar is on the right-bottom corner of the map but you can change it.
The toolbar is composed by a layer toggler and a zoom in/out buttons.
const
Properties
-
additionalButtons
→ List<
ThemedMapButton> -
additionalButtons defines the list of additional buttons to show.
final
- cancelLabelText → String
-
cancelLabelText defines the text to show on the cancel button.
By default is
Cancel
.final - changeLayerLabelText → String
-
changeLayerLabelText defines the text to show on the change layer button.
By default is
Change Layer
. This text is also used in the title of the dialog to change the layer.final - controller → ThemedMapController?
-
controller defines the
ThemedMapController
to listen some events from other widgets.final - enableGoogleStreetView → bool
-
enableGoogleStreetView defines if the google street view button is enabled.
Only will be shown if the selected layer is a google layer.
final
- flow → ThemedMapToolbarFlow
-
flow defines the flow of the toolbar. By default is vertical.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- key → Key?
-
Controls how one widget replaces another widget in the tree.
finalinherited
-
layers
→ List<
MapLayer> -
layers defines the list of layers to toggle.
You must provide
selectedLayer
to define which layer is selected. If is empty, the toggler will not be shown.final - mapController → MapController?
-
mapController defines the
MapController
class fromflutter_map
package.final -
mapKey
→ GlobalKey<
State< ?StatefulWidget> > -
mapKey defines the key of the map.
Is used to convert screen coordinates to map coordinates.
final
- onLayerChanged → (void Function(MapLayer?)?)
-
onLayerChanged defines the callback to execute when the user change the layer.
final
- onZoomIn → VoidCallback?
-
onZoomIn defines the callback to execute when the user press the zoom in button.
If is null, the button will not be shown.
final
- onZoomOut → VoidCallback?
-
onZoomOut defines the callback to execute when the user press the zoom out button.
If is null, the button will not be shown.
final
- position → Alignment
-
position defines the position of the toolbar.
By default is on the right-bottom corner of the map.
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- saveLabelText → String
-
saveLabelText defines the text to show on the save button.
By default is
Save
.final - selectedLayer → MapLayer?
-
selectedLayer defines the selected layer to use.
You must provide
layers
to define the list of layers to toggle.final - zoomInDisabled → bool
-
zoomInDisabled defines if the zoom in button is disabled.
final
- zoomInLabelText → String
-
zoomInLabelText defines the text to show on the zoom in button.
By default is
Zoom In
.final - zoomOutDisabled → bool
-
zoomOutDisabled defines if the zoom out button is disabled.
final
- zoomOutLabelText → String
-
zoomOutLabelText defines the text to show on the zoom out button.
By default is
Zoom Out
.final
Methods
-
createElement(
) → StatefulElement -
Creates a StatefulElement to manage this widget's location in the tree.
inherited
-
createState(
) → State< ThemedMapToolbar> -
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}) → 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