copyWith method

ScrollbarThemeData copyWith(
  1. {MaterialStateProperty<bool?>? thumbVisibility,
  2. MaterialStateProperty<double?>? thickness,
  3. MaterialStateProperty<bool?>? trackVisibility,
  4. bool? interactive,
  5. Radius? radius,
  6. MaterialStateProperty<Color?>? thumbColor,
  7. MaterialStateProperty<Color?>? trackColor,
  8. MaterialStateProperty<Color?>? trackBorderColor,
  9. double? crossAxisMargin,
  10. double? mainAxisMargin,
  11. double? minThumbLength,
  12. @Deprecated('Use ScrollbarThemeData.trackVisibility to resolve based on the current state instead. ' 'This feature was deprecated after v3.4.0-19.0.pre.') bool? showTrackOnHover}
)

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

Implementation

ScrollbarThemeData copyWith({
  MaterialStateProperty<bool?>? thumbVisibility,
  MaterialStateProperty<double?>? thickness,
  MaterialStateProperty<bool?>? trackVisibility,
  bool? interactive,
  Radius? radius,
  MaterialStateProperty<Color?>? thumbColor,
  MaterialStateProperty<Color?>? trackColor,
  MaterialStateProperty<Color?>? trackBorderColor,
  double? crossAxisMargin,
  double? mainAxisMargin,
  double? minThumbLength,
  @Deprecated(
    'Use ScrollbarThemeData.trackVisibility to resolve based on the current state instead. '
    'This feature was deprecated after v3.4.0-19.0.pre.',
  )
  bool? showTrackOnHover,
}) {
  return ScrollbarThemeData(
    thumbVisibility: thumbVisibility ?? this.thumbVisibility,
    thickness: thickness ?? this.thickness,
    trackVisibility: trackVisibility ?? this.trackVisibility,
    showTrackOnHover: showTrackOnHover ?? this.showTrackOnHover,
    interactive: interactive ?? this.interactive,
    radius: radius ?? this.radius,
    thumbColor: thumbColor ?? this.thumbColor,
    trackColor: trackColor ?? this.trackColor,
    trackBorderColor: trackBorderColor ?? this.trackBorderColor,
    crossAxisMargin: crossAxisMargin ?? this.crossAxisMargin,
    mainAxisMargin: mainAxisMargin ?? this.mainAxisMargin,
    minThumbLength: minThumbLength ?? this.minThumbLength,
  );
}