MapToolbarSettings class Null safety

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. [...]
read-only, inherited
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.
read-only, inherited

Methods

debugDescribeChildren() List<DiagnosticsNode>
Returns a list of DiagnosticsNode objects describing this node's children. [...]
@protected, inherited
debugFillProperties(DiagnosticPropertiesBuilder properties) → void
Add additional properties associated with the node. [...]
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent 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