errorStyle method

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

Returns a styling function for error messages.

Implementation

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