copyWith method

  1. @override
ToggleSpec copyWith({
  1. StyleSpec<FlexBoxSpec>? container,
  2. StyleSpec<TextSpec>? label,
  3. StyleSpec<IconSpec>? icon,
})
inherited

Creates a copy of this spec with the given fields replaced by the non-null parameter values.

Implementation

@override
ToggleSpec copyWith({
  StyleSpec<FlexBoxSpec>? container,
  StyleSpec<TextSpec>? label,
  StyleSpec<IconSpec>? icon,
}) {
  return ToggleSpec(
    container: container ?? this.container,
    label: label ?? this.label,
    icon: icon ?? this.icon,
  );
}