color property

Color color
final

Fills the tooltip by this color.

This snippet shows how to set the tooltip color in SfMaps.

 @override
 Widget build(BuildContext context) {
   return SfMaps(
     layers: [
       MapShapeLayer(
         enableShapeTooltip: true,
         tooltipSettings: MapTooltipSettings(
             color: Colors.black
         ),
         delegate: MapShapeLayerDelegate(
             shapeFile: "assets/world_map.json",
             shapeDataField: "continent",
             dataCount: bubbleData.length,
             primaryValueMapper: (index) {
               return bubbleData[index].country;
             }),
       )
     ],
   );
 }

See also:

  • textStyle, for customizing the style of the tooltip text.

Implementation

final Color color