copyWith method
- @useResult
- Color? focusColor,
- FWidgetStateMap<
Color> ? trackColor, - FWidgetStateMap<
Color> ? thumbColor, - EdgeInsetsGeometry? labelPadding,
- EdgeInsetsGeometry? descriptionPadding,
- EdgeInsetsGeometry? errorPadding,
- EdgeInsetsGeometry? childPadding,
- FWidgetStateMap<
TextStyle> ? labelTextStyle, - FWidgetStateMap<
TextStyle> ? descriptionTextStyle, - TextStyle? errorTextStyle,
Returns a copy of this FSwitchStyle with the given properties replaced.
Consider using the CLI to generate a style.
Parameters
- FSwitchStyle.focusColor - This FSwitch's color when focused.
- FSwitchStyle.trackColor - The track's color.
- FSwitchStyle.thumbColor - The thumb's color.
- FSwitchStyle.labelPadding - The label's padding.
- FSwitchStyle.descriptionPadding - The description's padding.
- FSwitchStyle.errorPadding - The error's padding.
- FSwitchStyle.childPadding - The child's padding.
- FSwitchStyle.labelTextStyle - The label's text style.
- FSwitchStyle.descriptionTextStyle - The description's text style.
- FSwitchStyle.errorTextStyle - The error's text style.
Implementation
@useResult
FSwitchStyle copyWith({
Color? focusColor,
FWidgetStateMap<Color>? trackColor,
FWidgetStateMap<Color>? thumbColor,
EdgeInsetsGeometry? labelPadding,
EdgeInsetsGeometry? descriptionPadding,
EdgeInsetsGeometry? errorPadding,
EdgeInsetsGeometry? childPadding,
FWidgetStateMap<TextStyle>? labelTextStyle,
FWidgetStateMap<TextStyle>? descriptionTextStyle,
TextStyle? errorTextStyle,
}) => FSwitchStyle(
focusColor: focusColor ?? this.focusColor,
trackColor: trackColor ?? this.trackColor,
thumbColor: thumbColor ?? this.thumbColor,
labelPadding: labelPadding ?? this.labelPadding,
descriptionPadding: descriptionPadding ?? this.descriptionPadding,
errorPadding: errorPadding ?? this.errorPadding,
childPadding: childPadding ?? this.childPadding,
labelTextStyle: labelTextStyle ?? this.labelTextStyle,
descriptionTextStyle: descriptionTextStyle ?? this.descriptionTextStyle,
errorTextStyle: errorTextStyle ?? this.errorTextStyle,
);