bubbleSizeMapper property

IndexedDoubleValueMapper? bubbleSizeMapper

Returns a value based on which bubble size will be calculated.

The minimum and maximum size of the bubble can be customized using the MapBubbleSettings.minRadius and MapBubbleSettings.maxRadius.

late List<Model> _data;
late MapShapeSource _mapSource;

void initState() {
  _data = <Model>[
   Model('India', 280, "Low"),
   Model('United States of America', 190, "High"),
   Model('Pakistan', 37, "Low"),

  _mapSource = MapShapeSource.asset(
    shapeDataField: "name",
    dataCount: _data.length,
    primaryValueMapper: (int index) {
      return _data[index].country;
    bubbleSizeMapper: (int index) {
      return _data[index].usersCount;


Widget build(BuildContext context) {
  return SfMaps(
    layers: [
          source: _mapSource,

class Model {
 const Model(this.country, this.usersCount, this.storage);

 final String country;
 final double usersCount;
 final String storage;


final IndexedDoubleValueMapper? bubbleSizeMapper;