commandStyle method

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

Returns a styling function for commands.

Implementation

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