copyWith method

  1. @useResult
FSwitchStyle copyWith({
  1. Color? focusColor,
  2. FLabelLayoutStyle? labelLayoutStyle,
  3. FSwitchStateStyle? enabledStyle,
  4. FSwitchStateStyle? disabledStyle,
  5. FSwitchErrorStyle? errorStyle,
})

Returns a copy of this FSwitchStyle with the given properties replaced.

Implementation

@useResult
FSwitchStyle copyWith({
  Color? focusColor,
  FLabelLayoutStyle? labelLayoutStyle,
  FSwitchStateStyle? enabledStyle,
  FSwitchStateStyle? disabledStyle,
  FSwitchErrorStyle? errorStyle,
}) =>
    FSwitchStyle(
      focusColor: focusColor ?? this.focusColor,
      labelLayoutStyle: labelLayoutStyle ?? this.labelLayoutStyle,
      enabledStyle: enabledStyle ?? this.enabledStyle,
      disabledStyle: disabledStyle ?? this.disabledStyle,
      errorStyle: errorStyle ?? this.errorStyle,
    );