withValue method
Creates a copy of this part with a new value.
Parameters:
value(String, required): The new value to associate with this part.
Returns: A new FormattedValuePart with the updated value.
Example:
final original = FormattedValuePart(DigitPart(), '1');
final updated = original.withValue('2');
Implementation
FormattedValuePart withValue(String value) {
return FormattedValuePart(part, value);
}