copyWith method
BarChartData
copyWith({
- List<
BarChartGroupData> ? barGroups, - double? groupsSpace,
- BarChartAlignment? alignment,
- FlTitlesData? titlesData,
- RangeAnnotations? rangeAnnotations,
- BarTouchData? barTouchData,
- FlGridData? gridData,
- FlBorderData? borderData,
- double? maxY,
- double? minY,
- double? baselineY,
- Color? backgroundColor,
- ExtraLinesData? extraLinesData,
Copies current BarChartData to a new BarChartData, and replaces provided values.
Implementation
BarChartData copyWith({
List<BarChartGroupData>? barGroups,
double? groupsSpace,
BarChartAlignment? alignment,
FlTitlesData? titlesData,
RangeAnnotations? rangeAnnotations,
BarTouchData? barTouchData,
FlGridData? gridData,
FlBorderData? borderData,
double? maxY,
double? minY,
double? baselineY,
Color? backgroundColor,
ExtraLinesData? extraLinesData,
}) {
return BarChartData(
barGroups: barGroups ?? this.barGroups,
groupsSpace: groupsSpace ?? this.groupsSpace,
alignment: alignment ?? this.alignment,
titlesData: titlesData ?? this.titlesData,
rangeAnnotations: rangeAnnotations ?? this.rangeAnnotations,
barTouchData: barTouchData ?? this.barTouchData,
gridData: gridData ?? this.gridData,
borderData: borderData ?? this.borderData,
maxY: maxY ?? this.maxY,
minY: minY ?? this.minY,
baselineY: baselineY ?? this.baselineY,
backgroundColor: backgroundColor ?? this.backgroundColor,
extraLinesData: extraLinesData ?? this.extraLinesData,
);
}