MapToolbarSettings class

Provides options for customizing the appearance of the toolbar in the web platform.

 late MapZoomPanBehavior _zoomPanBehavior;
 late MapShapeSource _mapSource;

  @override
  void initState() {
    _mapSource = MapShapeSource.asset(
      'assets/world_map.json',
      shapeDataField: 'continent',
    );
    _zoomPanBehavior = MapZoomPanBehavior()
      ..zoomLevel = 4
      ..focalLatLng = MapLatLng(19.0759837, 72.8776559)
      ..toolbarSettings = MapToolbarSettings();
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: Text('Zoom pan'),
      ),
      body: SfMaps(
        layers: [
          MapShapeLayer(
            source: _mapSource,
            zoomPanBehavior: _zoomPanBehavior,
          ),
        ],
      ),
    );
  }
Inheritance

Constructors

MapToolbarSettings({Color? iconColor, Color? itemBackgroundColor, Color? itemHoverColor, Axis direction = Axis.horizontal, MapToolbarPosition position = MapToolbarPosition.topRight})
Creates a MapToolbarSettings.
const

Properties

direction Axis
Arranges the toolbar items in either horizontal or vertical direction.
final
hashCode int
The hash code for this object.
no setterinherited
iconColor Color?
Specifies the color applies to the tooltip icons.
final
itemBackgroundColor Color?
Specifies the color applies to the tooltip icon's background.
final
itemHoverColor Color?
Specifies the color applies to the tooltip icon's background on hovering.
final
position MapToolbarPosition
Option to position the toolbar in all the corners of the maps.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

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.
override
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 brief description of this object, usually just the runtimeType and the hashCode.
inherited

Operators

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