copyWith method
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,
);
}