copyWith method

ZeroProgressStyle copyWith({
  1. Color? valueColor,
  2. Color? backgroundColor,
  3. double? lineSize,
})

If the caller passes in a value for a parameter, use that value, otherwise use the value from this object.

A new instance of ZeroProgressStyle with the same properties as the original instance, except for the properties that are explicitly overridden.

Implementation

ZeroProgressStyle copyWith({
  Color? valueColor,
  Color? backgroundColor,
  double? lineSize,
}) {
  return ZeroProgressStyle(
    valueColor: valueColor ?? this.valueColor,
    backgroundColor: backgroundColor ?? this.backgroundColor,
    lineSize: lineSize ?? this.lineSize,
  );
}