readFromString function

Future<TreeNode> readFromString (String content)

Read yaml from string

Implementation

Future<TreeNode> readFromString(String content) async {
  AST tree = AST();
  List<String> arr = content.split('\n');
  arr.forEach((f) {
    tree.addNode(f);
  });

  return tree.root;
}