PlaceholderPart class abstract interface

Represents a segment or fragment of a placeholder expression.

A Part is a building block used during placeholder parsing and resolution. It may represent literal text or a placeholder that must be resolved using a `PartResolutionContext`.

This interface is used by the placeholder parsing engine to build a list of Parts which can then be resolved dynamically during runtime.

You typically do not implement this directly unless building a custom placeholder parser or resolver engine.

Example usage

final context = MyPartResolutionContext(); // Your custom implementation
final parts = <Part>[...]; // Populated from parsing
final resolved = Part.resolveAll(parts, context);
print(resolved); // Prints the fully resolved placeholder string
Implementers

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

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resolve(PlaceholderPartResolutionContext resolutionContext) String
Represents a segment or fragment of a placeholder expression.
text() String
Returns the raw textual representation of this part.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

resolveAll(Iterable<PlaceholderPart> parts, PlaceholderPartResolutionContext resolutionContext) String
Resolves and concatenates all parts using the given resolutionContext.