DialogueNode class
An individual narrative unit inside a DialogueGraph.
Each node has a unique title, optional tags and header metadata, and a list of statements that are executed in order.
In Yarn Spinner a node looks like:
title: Innkeeper_Hub
tags: hub npc
---
Innkeeper: Good day, traveler.
-> Ask about quest.
<<jump Innkeeper_Quest>>
-> Farewell.
===
Constructors
-
DialogueNode({required String title, List<
String> tags = const [], Map<String, String> metadata = const {}, required List<DialogueStatement> statements}) -
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
-
metadata
→ Map<
String, String> -
All other header key/value pairs beyond
titleandtags.final - runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
statements
→ List<
DialogueStatement> -
Ordered list of parsed statements in this node's content block.
final
-
Space-separated tags declared in the
tags:header line.final - title → String
-
Unique identifier used by
<<jump>>and DialogueGraph.getNode.final
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.
inherited