HeadingBuilder typedef

HeadingBuilder = Widget Function(BuildContext context, int level, Widget content, HeadingStyle style)

Builds the widget for a # heading.

level is 1 to 6, content is the rendered heading text, and style is the resolved HeadingStyle. A builder owns the whole heading, including the rule an h1 draws by default — check style.showDivider if you want to keep that behaviour.

Implementation

typedef HeadingBuilder =
    Widget Function(
      BuildContext context,
      int level,
      Widget content,
      HeadingStyle style,
    );