FormattedValue class

Represents a complete formatted value composed of multiple parts.

A FormattedValue holds a list of FormattedValuePart instances, where each part represents either static text or editable fields. It provides methods to access value parts (excluding static parts) and retrieve individual parts by index.

Example:

final value = FormattedValue([
  FormattedValuePart(DigitPart(), '1'),
  FormattedValuePart(StaticPart('/'), null),
  FormattedValuePart(DigitPart(), '2'),
]);
print(value.values.length); // 2 (only value parts)

Constructors

FormattedValue([List<FormattedValuePart> parts = const []])
Creates a FormattedValue.
const

Properties

hashCode int
The hash code for this object.
no setteroverride
parts List<FormattedValuePart>
The list of parts that make up this formatted value.
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
values Iterable<FormattedValuePart>
Returns an iterable of only the parts that can hold values.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
override
operator [](int index) FormattedValuePart?
Retrieves the value part at the specified index.