itemBackgroundColor property

Color? itemBackgroundColor
final

Specifies the color applies to the tooltip icon's background.

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(
          itemBackgroundColor: Colors.blue);
    super.initState();
  }

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

Implementation

final Color? itemBackgroundColor;