copyWith method

LinearProgressIndicatorTheme copyWith({
  1. ValueGetter<Color?>? color,
  2. ValueGetter<Gradient?>? progressGradient,
  3. ValueGetter<Color?>? backgroundColor,
  4. ValueGetter<double?>? minHeight,
  5. ValueGetter<BorderRadiusGeometry?>? borderRadius,
  6. ValueGetter<bool?>? showSparks,
  7. ValueGetter<bool?>? disableAnimation,
})

Returns a copy of this theme with the given fields replaced.

Implementation

LinearProgressIndicatorTheme copyWith({
  ValueGetter<Color?>? color,
  ValueGetter<Gradient?>? progressGradient,
  ValueGetter<Color?>? backgroundColor,
  ValueGetter<double?>? minHeight,
  ValueGetter<BorderRadiusGeometry?>? borderRadius,
  ValueGetter<bool?>? showSparks,
  ValueGetter<bool?>? disableAnimation,
}) {
  return LinearProgressIndicatorTheme(
    color: color == null ? this.color : color(),
    progressGradient:
        progressGradient == null ? this.progressGradient : progressGradient(),
    backgroundColor:
        backgroundColor == null ? this.backgroundColor : backgroundColor(),
    minHeight: minHeight == null ? this.minHeight : minHeight(),
    borderRadius: borderRadius == null ? this.borderRadius : borderRadius(),
    showSparks: showSparks == null ? this.showSparks : showSparks(),
    disableAnimation:
        disableAnimation == null ? this.disableAnimation : disableAnimation(),
  );
}