Skip to content
pubscout

fl_heatmap

0.4.6, released a year ago by ehwplus.com

Heatmap widget for Flutter with customizable colors and dynamic labels

WASM-ready
$ flutter pub add fl_heatmap
Source repository

What it does

Provides a grid of colored cells representing data values. Supports custom color palettes, rounded corners, and click callbacks to retrieve cell data. Allows limiting visible rows and expanding to show all.

AI-written summary of version 0.4.6, based on the package's README and metadata. Report an inaccuracy

Use it when

  • You need a visual heatmap for data like consumption or usage
  • You want to customize colors and cell styles
  • You need to handle cell taps to show details

Skip it when

  • You need a chart with axes and legends
  • You require complex animations beyond simple color changes

Strengths

  • Easy to integrate, no code generation required
  • Supports dynamic labels and custom color palettes
  • Allows limiting rows for performance

Weaknesses

  • No built‑in animations or advanced chart features
  • Limited to rectangular heatmaps, not line/bar charts

Setup

Kind
Flutter widgets
Effort
Low
Code generation
No
Direct dependencies
0

Add dependency and run flutter packages get

import 'package:fl_heatmap/fl_heatmap.dart';

Heatmap(
  heatmapData: HeatmapData(
    rows: ['2022','2021'],
    columns: ['Jan','Feb'],
    items: [
      for (var r in ['2022','2021'])
        for (var c in ['Jan','Feb'])
          HeatmapItem(value: 5.0, unit: 'kWh', xAxisLabel: c, yAxisLabel: r),
    ],
  ),
  onItemSelectedListener: (item) => print(item?.value),
);

Alternatives

Packages that do the same job and could replace fl_heatmap.