textStyle property

TextStyle textStyle
final

Customizes the data label's text style.

This snippet shows how to set textStyle for the data labels in SfMaps.

 @override
 Widget build(BuildContext context) {
   return
     SfMaps(
       layers: [
         MapShapeLayer(
           dataLabelSettings:
               MapDataLabelSettings(
                   textStyle: TextStyle(color: Colors.red)
               ),
           delegate: MapShapeLayerDelegate(
               showDataLabels: true,
               shapeFile: "assets/world_map.json",
               shapeDataField: "continent",
               dataCount: bubbleData.length,
               primaryValueMapper: (index) {
                 return bubbleData[index].country;
               }),
         )
       ],
   );
 }

Implementation

final TextStyle textStyle