/syncfusion-flutter:syncfusion-flutter-treemapfrom Syncfusion Flutter Widgets
Implements Syncfusion Flutter TreeMap (SfTreemap) for visualizing hierarchical and proportional data in Flutter apps. Use when working with treemap layouts, nested rectangles, drill-down navigation, or hierarchical data visualization. This skill covers layouts, labels, tooltips, legends, selection, color mapping, and drilldown navigation.
Ships in Syncfusion Flutter Widgets. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
This skill guides you through implementing the Syncfusion Flutter TreeMap (SfTreemap) widget - a powerful visualization component for displaying hierarchical and proportional data using nested rectangles. TreeMaps excel at showing complex data relationships, making them ideal for dashboards, analytics, and data exploration interfaces.
Use this skill when the user needs to:
The Syncfusion Flutter TreeMap (SfTreemap) is a powerful data visualization widget that displays hierarchical data using nested rectangles. Each rectangle's size is proportional to a quantitative value, making it easy to compare values across different categories and levels.
TreeMap is ideal for:
📄 Read: references/getting-started.md
dataCount, weightValueMapper, levels📄 Read: references/layouts.md
📄 Read: references/hierarchical-data.md
groupMapper to organize dataweightValueMapper to size tilesdataCount property usage📄 Read: references/labels-customization.md
labelBuilder📄 Read: references/colors-theming.md
📄 Read: references/tooltip-selection.md
tooltipBuilderonSelectionChanged events📄 Read: references/legend.md
📄 Read: references/drilldown.md
onTap callback📄 Read: references/advanced-features.md
itemBuilderHere's a minimal example to get you started:
import 'package:flutter/material.dart';
import 'package:syncfusion_flutter_treemap/treemap.dart';
class BasicTreemapExample extends StatefulWidget {
@override
_BasicTreemapExampleState createState() => _BasicTreemapExampleState();
}
class _BasicTreemapExampleState extends State<BasicTreemapExample> {
late List<SalesData> _salesData;
@override
void initState() {
_salesData = [
SalesData(region: 'North America', sales: 8500),
SalesData(region: 'Europe', sales: 6200),
SalesData(region: 'Asia', sales: 9800),
SalesData(region: 'South America', sales: 3400),
SalesData(region: 'Africa', sales: 2100),
];
super.initState();
}
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: Text('Sales by Region')),
body: Center(
child: Container(
height: 400,
width: 400,
padding: EdgeInsets.all(16),
child: SfTreemap(
dataCount: _salesData.length,
weightValueMapper: (int index) {
return _salesData[index].sales;
},
levels: [
TreemapLevel(
groupMapper: (int index) {
return _salesData[index].region;
},
labelBuilder: (BuildContext context, TreemapTile tile) {
return Padding(
padding: EdgeInsets.all(4),
child: Text(
tile.group,
style: TextStyle(color: Colors.black),
),
);
},
),
],
),
),
),
);
}
}
class SalesData {
SalesData({required this.region, required this.sales});
final String region;
final double sales;
}
// Multi-level data structure
class SalesData {
SalesData({
required this.region,
required this.country,
required this.sales,
});
final String region;
final String country;
final double sales;
}
// TreeMap with two levels
SfTreemap(
dataCount: _salesData.length,
weightValueMapper: (int index) => _salesData[index].sales,
levels: [
TreemapLevel(
groupMapper: (int index) => _salesData[index].region,
),
TreemapLevel(
groupMapper: (int index) => _salesData[index].country,
),
],
)
SfTreemap(
dataCount: _data.length,
weightValueMapper: (int index) => _data[index].value,
colorMappers: [
TreemapColorMapper.range(
from: 0,
to: 25,
color: Colors.green,
name: 'Low',
),
TreemapColorMapper.range(
from: 25,
to: 50,
color: Colors.yellow,
name: 'Medium',
),
TreemapColorMapper.range(
from: 50,
to: 100,
color: Colors.red,
name: 'High',
),
],
legend: TreemapLegend.bar(),
levels: [
TreemapLevel(
groupMapper: (int index) => _data[index].category,
),
],
)
SfTreemap(
dataCount: _data.length,
weightValueMapper: (int index) => _data[index].value,
onSelectionChanged: (TreemapTile tile) {
setState(() {
// Add selection changed functionalities here
});
},
levels: [
TreemapLevel(
groupMapper: (int index) => _data[index].category,
color: Colors.blue[200],
tooltipBuilder: (BuildContext context, TreemapTile tile) {
return Container(
padding: EdgeInsets.all(8),
decoration: BoxDecoration(
color: Colors.black87,
borderRadius: BorderRadius.circular(4),
),
child: Text(
'${tile.group}: ${tile.weight}',
style: TextStyle(color: Colors.white),
),
);
},
),
],
)
| Property | Type | Description |
|---|---|---|
dataCount | int | Number of data points in the source |
weightValueMapper | IndexedDoubleValueMapper | Callback returning numeric value for tile size |
levels | List<TreemapLevel> | Hierarchy levels configuration |
| Property | Type | Description |
|---|---|---|
groupMapper | IndexedStringValueMapper | Groups data for this level |
labelBuilder | TreemapLabelBuilder? | Custom label widget builder |
tooltipBuilder | TreemapTooltipBuilder? | Custom tooltip widget builder |
color | Color? | Default tile color for this level |
border | RoundedRectangleBorder? | Tile border styling |
padding | EdgeInsetsGeometry? | Padding around tiles |
Note: The layout algorithm is determined by the constructor used, not by a property. Use
SfTreemap()for squarified (default),SfTreemap.slice()for slice, orSfTreemap.dice()for dice.
| Property | Type | Description |
|---|---|---|
colorMappers | List<TreemapColorMapper>? | Value/range-based coloring |
legend | TreemapLegend? | Legend widget configuration |
onSelectionChanged | ValueChanged<TreemapTile>? | Selection event handler |
layoutDirection | TreemapLayoutDirection | Layouts the tiles in top-left, top-right, bottom-left and bottom-right directions; default topLeft |
sortAscending | bool | Sort tiles by weight (slice/dice only) |
Display organizational budget breakdown by department and sub-categories with color coding for spending levels.
When to use: Multi-level budget tracking, resource allocation
Visualize sales data across regions, countries, and products with interactive drilldown.
When to use: Regional sales comparison, market analysis, performance dashboards
Show disk space usage by folders and files with proportional sizing.
When to use: Storage analysis, file management tools, disk cleanup utilities
Display market share data for different companies, products, or categories.
When to use: Competitive analysis, portfolio composition, market research
Show organizational structure with metrics like headcount or budget per team.
When to use: HR dashboards, resource planning, org chart visualizations
No tiles visible?
dataCount matches your data lengthweightValueMapper returns positive numbersgroupMapper returns non-null stringsLabels not showing?
labelBuilder to TreemapLevelColors not applying?
colorMappers values match your data rangeSelection not working?
onSelectionChanged callbacksetState to rebuildFor detailed troubleshooting and solutions, refer to the specific reference documentation.
references/advanced-features.md (opens in a new tab)references/colors-theming.md (opens in a new tab)references/drilldown.md (opens in a new tab)references/getting-started.md (opens in a new tab)references/hierarchical-data.md (opens in a new tab)references/labels-customization.md (opens in a new tab)references/layouts.md (opens in a new tab)references/legend.md (opens in a new tab)references/tooltip-selection.md (opens in a new tab)What SKILL.md sets; muted values are Claude Code's defaults
npx claudepluginhub syncfusion/boldcreate-plugins --plugin syncfusion-flutter14 skills in this plugin
/syncfusion-flutter-barcode-generatorImplements Syncfusion Flutter Barcode Generator (SfBarcodeGenerator) for generating 1D and 2D barcodes in Flutter apps. Use when working with QR codes, Data Matrix, Code128, EAN, UPC, or other machine-readable barcode formats. This skill covers barcode types, customization, sizing, text display, and integration into product labels, ticketing, or inventory systems./syncfusion-flutter-calendar-datepickerImplements Syncfusion Flutter Calendar (SfCalendar) and Date Range Picker (SfDateRangePicker) widgets for date and scheduling UIs in Flutter apps. Use when building appointment calendars, booking systems, date range selectors, or event scheduling interfaces. This skill covers calendar views, recurring events, date navigation, localization, callbacks, and customization./syncfusion-flutter-cartesian-chartsImplements Syncfusion Flutter Cartesian Charts (SfCartesianChart) for a wide range of 2D chart types in Flutter apps. Use when working with line, column, bar, area, spline, scatter, bubble, financial, stacked, or histogram charts. This skill covers axis types (NumericAxis, CategoryAxis, DateTimeAxis), zoom and pan, tooltip, trackball, legend, annotations, technical indicators, trendlines, and chart export.Other plugins' skills for the same job