PlaceholderTextPart constructor

PlaceholderTextPart(
  1. String text
)

A PlaceholderPart implementation that represents literal, already-resolved text within a placeholder expression.

TextPart is used for static text segments that require no further processing or resolution.

These parts are returned as-is during placeholder resolution. They typically appear in expressions like:

final part = TextPart('hello');
print(part.resolve(context)); // prints 'hello'

This class extends PlaceholderAbstractPart and simply returns the original text when resolved.

Creates a new PlaceholderTextPart with the given static text.

Example:

var part = TextPart('static');
print(part.text()); // 'static'

Implementation

PlaceholderTextPart(super.text);