iconType property

MapIconType iconType

Specifies the shape of the legend icon.

Defaults to MapIconType.circle.

 Widget build(BuildContext context) {
   return SfMaps(
     layers: [
         showLegend: true,
         legendSettings: MapLegendSettings(
             iconType: MapIconType.square
         delegate: MapShapeLayerDelegate(
             shapeFile: "assets/world_map.json",
             shapeDataField: "continent",
             dataCount: bubbleData.length,
             primaryValueMapper: (index) {
               return bubbleData[index].country;

See also:

  • showIcon, to show or hide the icon for the legend items.
  • iconSize, to set the size of the icon.


final MapIconType iconType