copyWith method
LineChartData
copyWith({
- List<
LineChartBarData> ? lineBarsData, - List<
BetweenBarsData> ? betweenBarsData, - FlTitlesData? titlesData,
- RangeAnnotations? rangeAnnotations,
- ExtraLinesData? extraLinesData,
- LineTouchData? lineTouchData,
- List<
ShowingTooltipIndicators> ? showingTooltipIndicators, - FlGridData? gridData,
- FlBorderData? borderData,
- double? minX,
- double? maxX,
- double? baselineX,
- double? minY,
- double? maxY,
- double? baselineY,
- FlClipData? clipData,
- Color? backgroundColor,
Copies current LineChartData to a new LineChartData, and replaces provided values.
Implementation
LineChartData copyWith({
List<LineChartBarData>? lineBarsData,
List<BetweenBarsData>? betweenBarsData,
FlTitlesData? titlesData,
RangeAnnotations? rangeAnnotations,
ExtraLinesData? extraLinesData,
LineTouchData? lineTouchData,
List<ShowingTooltipIndicators>? showingTooltipIndicators,
FlGridData? gridData,
FlBorderData? borderData,
double? minX,
double? maxX,
double? baselineX,
double? minY,
double? maxY,
double? baselineY,
FlClipData? clipData,
Color? backgroundColor,
}) =>
LineChartData(
lineBarsData: lineBarsData ?? this.lineBarsData,
betweenBarsData: betweenBarsData ?? this.betweenBarsData,
titlesData: titlesData ?? this.titlesData,
rangeAnnotations: rangeAnnotations ?? this.rangeAnnotations,
extraLinesData: extraLinesData ?? this.extraLinesData,
lineTouchData: lineTouchData ?? this.lineTouchData,
showingTooltipIndicators:
showingTooltipIndicators ?? this.showingTooltipIndicators,
gridData: gridData ?? this.gridData,
borderData: borderData ?? this.borderData,
minX: minX ?? this.minX,
maxX: maxX ?? this.maxX,
baselineX: baselineX ?? this.baselineX,
minY: minY ?? this.minY,
maxY: maxY ?? this.maxY,
baselineY: baselineY ?? this.baselineY,
clipData: clipData ?? this.clipData,
backgroundColor: backgroundColor ?? this.backgroundColor,
);