RenderConfig.fromRenderer constructor

RenderConfig.fromRenderer(
  1. Renderer renderer, {
  2. int terminalWidth = 80,
})

Creates a RenderConfig from a Renderer's detected settings.

Copies the renderer's color profile and background detection. The terminalWidth must be provided separately.

Implementation

factory RenderConfig.fromRenderer(
  Renderer renderer, {
  int terminalWidth = 80,
}) => RenderConfig(
  terminalWidth: terminalWidth,
  colorProfile: renderer.colorProfile,
  hasDarkBackground: renderer.hasDarkBackground,
);