ChartLegend constructor
const
ChartLegend({
- Key? key,
- required List<
ChartLegendItem> items, - ValueChanged<
Color> ? onToggle, - ChartTheme? theme,
- Axis direction = Axis.horizontal,
- double runSpacing = 8.0,
- double spacing = 16.0,
- EdgeInsets padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 6),
- double swatchSize = 12.0,
- TextStyle? labelStyle,
Implementation
const ChartLegend({
super.key,
required this.items,
this.hidden = const <Color>{},
this.onToggle,
this.theme,
this.direction = Axis.horizontal,
this.runSpacing = 8.0,
this.spacing = 16.0,
this.padding = const EdgeInsets.symmetric(horizontal: 8, vertical: 6),
this.swatchSize = 12.0,
this.labelStyle,
});