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