Skip to content
On this page

StackedMeter

A segmented meter for displaying a distribution of values.

StackedMeter in FluttyUIStackedMeter in FluttyUI dark theme

Import

import 'package:flutter/widgets.dart';
import 'package:fluttyui/fluttyui.dart' as ui;

API Reference

The declarations below match the current FluttyUI source. Types are shown without the optional ui. import prefix.

StackedMeter

const StackedMeter({
  super.key,
  required this.segments,
  this.label,
  this.maxValue,
  this.height = 10,
  this.gap = 2,
  this.showLegend = true,
  this.showValues = true,
  this.showPercentages = false,
  this.valueFormatter,
  this.trackColor,
  this.borderRadius,
  this.animate = true,
  this.animationDuration,
  this.animationCurve,
  this.semanticLabel,
});
ParameterTypeRequiredDefault
keyKey?Nonull
segmentsList<ChartSegment>Yes—
labelString?Nonull
maxValuedouble?Nonull
heightdoubleNo10
gapdoubleNo2
showLegendboolNotrue
showValuesboolNotrue
showPercentagesboolNofalse
valueFormatterString Function(double)?Nonull
trackColorColor?Nonull
borderRadiusdouble?Nonull
animateboolNotrue
animationDurationDuration?Nonull
animationCurveCurve?Nonull
semanticLabelString?Nonull

Application Setup

Place components under FluttyApp to provide theme, navigation, localization, and overlay defaults. Use theme tokens for shared appearance settings.

Source

lib/src/widgets/charts/stacked_meter/stacked_meter.dart

This reference is generated from the StackedMeter declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

DartFlutter

Get started with FluttyUI