copyWith method

  1. @override
ThemeExtension<BeforeAfterTheme> copyWith({
  1. double? trackWidth,
  2. Color? trackColor,
  3. double? thumbHeight,
  4. double? thumbWidth,
  5. Color? overlayColor,
  6. BoxDecoration? thumbDecoration,
  7. MaterialStateProperty<MouseCursor?>? mouseCursor,
})
override

Creates a copy of this theme extension with the given fields replaced by the non-null parameter values.

Implementation

@override
ThemeExtension<BeforeAfterTheme> copyWith({
  double? trackWidth,
  Color? trackColor,
  double? thumbHeight,
  double? thumbWidth,
  Color? overlayColor,
  BoxDecoration? thumbDecoration,
  MaterialStateProperty<MouseCursor?>? mouseCursor,
}) {
  return BeforeAfterTheme(
    trackWidth: trackWidth ?? this.trackWidth,
    trackColor: trackColor ?? this.trackColor,
    thumbHeight: thumbHeight ?? this.thumbHeight,
    thumbWidth: thumbWidth ?? this.thumbWidth,
    overlayColor: overlayColor ?? this.overlayColor,
    thumbDecoration: thumbDecoration ?? this.thumbDecoration,
    mouseCursor: mouseCursor ?? this.mouseCursor,
  );
}