copyWith method

ProgressTheme copyWith({
  1. ValueGetter<Color?>? color,
  2. ValueGetter<Color?>? backgroundColor,
  3. ValueGetter<BorderRadiusGeometry?>? borderRadius,
  4. ValueGetter<double?>? minHeight,
})

Creates a copy of this theme but with the given fields replaced with the new values.

Implementation

ProgressTheme copyWith({
  ValueGetter<Color?>? color,
  ValueGetter<Color?>? backgroundColor,
  ValueGetter<BorderRadiusGeometry?>? borderRadius,
  ValueGetter<double?>? minHeight,
}) {
  return ProgressTheme(
    color: color == null ? this.color : color(),
    backgroundColor:
        backgroundColor == null ? this.backgroundColor : backgroundColor(),
    borderRadius: borderRadius == null ? this.borderRadius : borderRadius(),
    minHeight: minHeight == null ? this.minHeight : minHeight(),
  );
}