fallbackRender function

CustomRender fallbackRender({
  1. CSS3? style,
  2. List<InlineSpan>? children,
})

Implementation

CustomRender fallbackRender({
  CSS3? style,
  List<InlineSpan>? children,
}) {
  return CustomRender.inlineSpan(
      inlineSpan: (context, buildChildren) => TextSpan(
            style: style?.generateTextStyle() ?? context.style.generateTextStyle(),
            children: context.tree.children
                .expand((tree) => [
                      context.parser.parseTree(context, tree),
                      if (tree.style.display == Display.block &&
                          tree.element?.parent?.localName != "th" &&
                          tree.element?.parent?.localName != "td" &&
                          tree.element?.localName != "html" &&
                          tree.element?.localName != "body")
                        const TextSpan(text: "\n"),
                    ])
                .toList(),
          ));
}