buildLeaf method
TreeNode
buildLeaf(
- StateKey key,
- StateCreator createState,
- StateDataCodec? codec, {
- bool isFinal = false,
Implementation
TreeNode buildLeaf(
StateKey key,
StateCreator createState,
StateDataCodec? codec, {
bool isFinal = false,
}) {
assert(parentNode != null);
var node = isFinal
? TreeNode(NodeType.finalLeafNode, key, parentNode!, createState, codec)
: TreeNode(NodeType.leafNode, key, parentNode!, createState, codec);
_addNode(node);
return node;
}