fallbackRender function

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

Implementation

CustomRender fallbackRender({Style? style, List<InlineSpan>? children}) =>
    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(),
            ));