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.
PieChart
const PieChart({
super.key,
required this.data,
required this.labelKey,
required this.valueKey,
this.colorKey = 'color',
this.pie = const Pie(),
this.width,
this.height,
this.aspectRatio = 1,
this.padding = const EdgeInsets.all(16),
this.animation = const ChartAnimation(),
this.resetKey,
this.interaction = const ChartInteraction(),
this.controller,
this.onSelectionChanged,
this.onChartBoundsChange,
this.center,
this.emptyBuilder,
this.semanticsLabel = 'Pie chart',
});| Parameter | Type | Required | Default |
|---|---|---|---|
key | Key? | No | null |
data | List<ChartDatum> | Yes | — |
labelKey | String | Yes | — |
valueKey | String | Yes | — |
colorKey | String | No | 'color' |
pie | Pie | No | const Pie() |
width | double? | No | null |
height | double? | No | null |
aspectRatio | double | No | 1 |
padding | EdgeInsets | No | const EdgeInsets.all(16) |
animation | ChartAnimation | No | const ChartAnimation() |
resetKey | Object? | No | null |
interaction | ChartInteraction | No | const ChartInteraction() |
controller | ChartController? | No | null |
onSelectionChanged | ValueChanged<ChartSelection?>? | No | null |
onChartBoundsChange | ValueChanged<Rect>? | No | null |
center | Widget? | No | null |
emptyBuilder | WidgetBuilder? | No | null |
semanticsLabel | String | No | 'Pie chart' |
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/pie_chart/pie_chart.dart
This reference is generated from the PieChart declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

