copyWith method

  1. @useResult
FSwitchStyle copyWith({
  1. Color? focusColor,
  2. FVariantsValueDelta<FSwitchVariantConstraint, FSwitchVariant, Color, Delta>? trackColor,
  3. FVariantsValueDelta<FSwitchVariantConstraint, FSwitchVariant, Color, Delta>? thumbColor,
  4. FLabelStyleDelta? leadingLabelStyle,
  5. FLabelStyleDelta? trailingLabelStyle,
})

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

See customizing widget styles.

Parameters

Implementation

@useResult
FSwitchStyle copyWith({
  Color? focusColor,
  FVariantsValueDelta<FSwitchVariantConstraint, FSwitchVariant, Color, Delta>? trackColor,
  FVariantsValueDelta<FSwitchVariantConstraint, FSwitchVariant, Color, Delta>? thumbColor,
  FLabelStyleDelta? leadingLabelStyle,
  FLabelStyleDelta? trailingLabelStyle,
}) => .new(
  focusColor: focusColor ?? this.focusColor,
  trackColor: trackColor?.call(this.trackColor) ?? this.trackColor,
  thumbColor: thumbColor?.call(this.thumbColor) ?? this.thumbColor,
  leadingLabelStyle: leadingLabelStyle?.call(this.leadingLabelStyle) ?? this.leadingLabelStyle,
  trailingLabelStyle: trailingLabelStyle?.call(this.trailingLabelStyle) ?? this.trailingLabelStyle,
);