copyWith method

CircularProgressIndicatorTheme copyWith({
  1. ValueGetter<Color?>? color,
  2. ValueGetter<Color?>? backgroundColor,
  3. ValueGetter<double?>? size,
  4. ValueGetter<double?>? strokeWidth,
})

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

Implementation

CircularProgressIndicatorTheme copyWith({
  ValueGetter<Color?>? color,
  ValueGetter<Color?>? backgroundColor,
  ValueGetter<double?>? size,
  ValueGetter<double?>? strokeWidth,
}) {
  return CircularProgressIndicatorTheme(
    color: color == null ? this.color : color(),
    backgroundColor:
        backgroundColor == null ? this.backgroundColor : backgroundColor(),
    size: size == null ? this.size : size(),
    strokeWidth: strokeWidth == null ? this.strokeWidth : strokeWidth(),
  );
}