optionStyle method

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

Returns a styling function for options.

Implementation

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