TextInputStyleState constructor

TextInputStyleState({
  1. Style? text,
  2. Style? placeholder,
  3. Style? suggestion,
  4. Style? prompt,
  5. Style? selection,
})

Creates a style state with optional styles for each element.

All styles default to an empty Style if not provided.

Implementation

TextInputStyleState({
  Style? text,
  Style? placeholder,
  Style? suggestion,
  Style? prompt,
  Style? selection,
}) : text = text ?? Style(),
     placeholder = placeholder ?? Style(),
     suggestion = suggestion ?? Style(),
     prompt = prompt ?? Style(),
     selection =
         selection ??
         Style().background(AnsiColor(7)).foreground(AnsiColor(0));