LeafNode constructor
LeafNode(
- Object data
Implementation
factory LeafNode(Object data) {
LeafNode node;
if (data is EmbeddableObject) {
node = EmbedNode(data);
} else {
final text = data as String;
assert(text.isNotEmpty);
node = TextNode(text);
}
return node;
}