copyWith method

FlLine copyWith({
  1. Color? color,
  2. Gradient? gradient,
  3. double? strokeWidth,
  4. List<int>? dashArray,
})

Copies current FlLine to a new FlLine, and replaces provided values.

Implementation

FlLine copyWith({
  Color? color,
  Gradient? gradient,
  double? strokeWidth,
  List<int>? dashArray,
}) {
  return FlLine(
    color: color ?? this.color,
    gradient: gradient ?? this.gradient,
    strokeWidth: strokeWidth ?? this.strokeWidth,
    dashArray: dashArray ?? this.dashArray,
  );
}