divider property

Widget? divider
final

Returns a widget for the breadcrumb divider.

Placed between two breadcrumb items.

late List<SocialMediaUsers> _socialMediaUsersData;

@override
void initState() {
   _socialMediaUsersData = <SocialMediaUsers>[
      SocialMediaUsers('India', 'Facebook', 280),
     SocialMediaUsers('India', 'Instagram', 88),
      SocialMediaUsers('USA', 'Facebook', 190),
      SocialMediaUsers('USA', 'Instagram', 120),
      SocialMediaUsers('Japan', 'Twitter', 48),
      SocialMediaUsers('Japan', 'Instagram', 31),
   ];
   super.initState();
}

@override
Widget build(BuildContext context) {
   return Scaffold(
      body: SfTreemap(
        dataCount: _socialMediaUsersData.length,
        weightValueMapper: (int index) {
          return _socialMediaUsersData[index].usersInMillions;
        },
        enableDrilldown: true,
        breadcrumbs: TreemapBreadcrumbs(
          builder:
          (BuildContext context, TreemapTile tile, bool isCurrent) {
            return Text(tile.group);
          },
          divider: Icon(Icons.arrow_right, color: Colors.grey),
        ),
        levels: [
          TreemapLevel(
            groupMapper: (int index) {
              return _socialMediaUsersData[index].country;
            },
            labelBuilder: (BuildContext context, TreemapTile tile) {
              return Text(tile.group);
            },
          ),
          TreemapLevel(
            groupMapper: (int index) {
              return _socialMediaUsersData[index].socialMedia;
            },
            labelBuilder: (BuildContext context, TreemapTile tile) {
              return Text(tile.group);
            },
          ),
        ],
      ),
    );
  }

Implementation

final Widget? divider;