lexDomTree static method
StyledElement
lexDomTree(
- Document html,
- List<
String> customRenderTags, - List<
String> tagsList, - BuildContext context,
lexDomTree converts a DOM document to a simplified tree of StyledElements.
Implementation
static StyledElement lexDomTree(
dom.Document html,
List<String> customRenderTags,
List<String> tagsList,
NavigationDelegate? navigationDelegateForIframe,
BuildContext context,
) {
StyledElement tree = StyledElement(
name: "[Tree Root]",
children: <StyledElement>[],
node: html.documentElement,
style: Style.fromTextStyle(Theme.of(context).textTheme.bodyText2!),
);
html.nodes.forEach((node) {
tree.children.add(_recursiveLexer(
node,
customRenderTags,
tagsList,
navigationDelegateForIframe,
));
});
return tree;
}