defaultTextInputStyles function
Returns the default styles for the text input.
Creates sensible defaults for both dark and light terminal backgrounds.
isDark: Set totrue(default) for dark terminals,falsefor light.
Returns a TextInputStyles with appropriate colors for the background type.
Implementation
TextInputStyles defaultTextInputStyles({bool isDark = true}) {
return TextInputStyles(
focused: TextInputStyleState(
placeholder: Style().foreground(AnsiColor(240)),
suggestion: Style().foreground(AnsiColor(240)),
prompt: Style().foreground(AnsiColor(7)),
text: Style(),
),
blurred: TextInputStyleState(
placeholder: Style().foreground(AnsiColor(240)),
suggestion: Style().foreground(AnsiColor(240)),
prompt: Style().foreground(AnsiColor(7)),
text: Style().foreground(isDark ? AnsiColor(7) : AnsiColor(245)),
),
cursor: TextInputCursorStyle(
color: AnsiColor(7),
shape: CursorShape.block,
blink: true,
),
);
}