copyWith method

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

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

Implementation

LinearProgressIndicatorTheme copyWith({
  ValueGetter<Color?>? color,
  ValueGetter<Color?>? backgroundColor,
  ValueGetter<double?>? minHeight,
  ValueGetter<BorderRadiusGeometry?>? borderRadius,
  ValueGetter<bool?>? showSparks,
  ValueGetter<bool?>? disableAnimation,
}) {
  return LinearProgressIndicatorTheme(
    color: color == null ? this.color : color(),
    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(),
  );
}