copyWith method
- MaterialStateProperty<
Color?> ? thumbColor, - MaterialStateProperty<
Color?> ? trackColor, - MaterialStateProperty<
Color?> ? trackOutlineColor, - MaterialStateProperty<
double?> ? trackOutlineWidth, - MaterialTapTargetSize? materialTapTargetSize,
- MaterialStateProperty<
MouseCursor?> ? mouseCursor, - MaterialStateProperty<
Color?> ? overlayColor, - double? splashRadius,
- MaterialStateProperty<
Icon?> ? thumbIcon,
Creates a copy of this object but with the given fields replaced with the new values.
Implementation
SwitchThemeData copyWith({
MaterialStateProperty<Color?>? thumbColor,
MaterialStateProperty<Color?>? trackColor,
MaterialStateProperty<Color?>? trackOutlineColor,
MaterialStateProperty<double?>? trackOutlineWidth,
MaterialTapTargetSize? materialTapTargetSize,
MaterialStateProperty<MouseCursor?>? mouseCursor,
MaterialStateProperty<Color?>? overlayColor,
double? splashRadius,
MaterialStateProperty<Icon?>? thumbIcon,
}) {
return SwitchThemeData(
thumbColor: thumbColor ?? this.thumbColor,
trackColor: trackColor ?? this.trackColor,
trackOutlineColor: trackOutlineColor ?? this.trackOutlineColor,
trackOutlineWidth: trackOutlineWidth ?? this.trackOutlineWidth,
materialTapTargetSize: materialTapTargetSize ?? this.materialTapTargetSize,
mouseCursor: mouseCursor ?? this.mouseCursor,
overlayColor: overlayColor ?? this.overlayColor,
splashRadius: splashRadius ?? this.splashRadius,
thumbIcon: thumbIcon ?? this.thumbIcon,
);
}