renderInlineOrFallback function

Widget renderInlineOrFallback(
  1. List<MarkdownNode> children,
  2. TextStyle? style,
  3. MarkdownRenderContext context
)

Renders children via the inline renderer when available, otherwise falls back to a flat Text widget built from extractPlainText.

Shared by inline-style builders (bold, italic, underline, etc.) so the null-check dispatch lives in one place.

Implementation

Widget renderInlineOrFallback(
  List<MarkdownNode> children,
  TextStyle? style,
  MarkdownRenderContext context,
) {
  final inlineRenderer = context.inlineRenderer;
  return inlineRenderer != null
      ? inlineRenderer(children, style)
      : Text(extractPlainText(children), style: style);
}