copyWith method

ScrollbarTheme copyWith({
  1. ValueGetter<Color?>? color,
  2. ValueGetter<double?>? thickness,
  3. ValueGetter<Radius?>? radius,
})

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

Implementation

ScrollbarTheme copyWith({
  ValueGetter<Color?>? color,
  ValueGetter<double?>? thickness,
  ValueGetter<Radius?>? radius,
}) {
  return ScrollbarTheme(
    color: color == null ? this.color : color(),
    thickness: thickness == null ? this.thickness : thickness(),
    radius: radius == null ? this.radius : radius(),
  );
}