headingStyle method

String Function(String) headingStyle(
  1. Renderer renderer
)

Returns a styling function for headings.

Implementation

String Function(String) headingStyle(Renderer renderer) {
  final color = heading ?? HelpColorScheme.default_.heading!;
  return (text) =>
      (Style()
            ..colorProfile = renderer.colorProfile
            ..hasDarkBackground = renderer.hasDarkBackground
            ..bold()
            ..foreground(color))
          .render(text);
}