VtSgrParser class final
SGR (Select Graphic Rendition) parameter parser.
Parses CSI SGR parameter values into structured attribute data.
final parser = VtSgrParser();
final attrs = parser.parseParams([1, 31]); // bold + red foreground
for (final attr in attrs) {
print(attr.tag);
}
parser.close();
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
close(
) → void - Releases parser resources.
-
next(
) → VtSgrAttributeData? -
Returns the next parsed attribute, or
nullif exhausted. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
parseAll(
) → List< VtSgrAttributeData> - Parses all currently configured attributes.
-
parseParams(
List< int> params, {String? separators}) → List<VtSgrAttributeData> -
Parses
paramsand returns all attributes in one call. -
reset(
) → void - Resets iteration state.
-
setParams(
List< int> params, {String? separators}) → void - Sets SGR parameter values and optional separators.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited