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.
BarChart
const BarChart({
super.key,
required this.data,
required this.xKey,
required this.yKeys,
required this.builder,
this.height,
this.padding = EdgeInsets.zero,
this.domainPadding = const EdgeInsets.symmetric(
horizontal: 12,
vertical: 8,
),
this.barEdgePadding = 12,
this.domain,
this.viewport,
this.xAxis = const BarXAxis(),
this.yAxis = const [BarYAxis()],
this.frame,
this.theme,
this.animation = BarAnimationState.enabled,
this.gestureLongPressDelay = const Duration(milliseconds: 100),
this.onSelectionChanged,
this.onChartBoundsChanged,
this.overlayBuilder,
this.semanticLabel,
});| Parameter | Type | Required | Default |
|---|---|---|---|
key | Key? | No | null |
data | List<Map<String, Object?>> | Yes | — |
xKey | String | Yes | — |
yKeys | List<String> | Yes | — |
builder | BarChartBuilder | Yes | — |
height | double? | No | null |
padding | EdgeInsets | No | EdgeInsets.zero |
domainPadding | EdgeInsets | No | const EdgeInsets.symmetric( horizontal: 12, vertical: 8, ) |
barEdgePadding | double | No | 12 |
domain | BarDomain? | No | null |
viewport | BarDomain? | No | null |
xAxis | BarXAxis | No | const BarXAxis() |
yAxis | List<BarYAxis> | No | const [BarYAxis()] |
frame | BarFrame? | No | null |
theme | BarTheme? | No | null |
animation | BarAnimationState | No | BarAnimationState.enabled |
gestureLongPressDelay | Duration | No | const Duration(milliseconds: 100) |
onSelectionChanged | ValueChanged<BarSelection?>? | No | null |
onChartBoundsChanged | ValueChanged<Rect>? | No | null |
overlayBuilder | BarOverlayBuilder? | No | null |
semanticLabel | String? | No | null |
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/bar_chart/chart_widget.dart
This reference is generated from the BarChart declaration in the FluttyUI core checkout. The component catalog lists the other available building blocks.

