DotPrompt class
The main class for working with .prompt files.
Constructors
-
DotPrompt.new(String content, {Map<
String, dynamic> ? defaults}) -
Loads a .prompt from a string content.
factory
Properties
- frontMatter → DotPromptFrontMatter
-
The properties parsed from the front matter of the prompt file.
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- template → String
-
The template content of the prompt file.
no setter
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
render(
[Map< String, dynamic> input = const {}]) → String - Renders the template with the given input data. Throws ValidationException if the input data fails schema validation.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited