utils/theme/theme_utils
library
Functions
-
calculateLayoutDimensions({required int columns, required LayoutMode layoutMode, required int optimalLeftWidth})
→ LayoutDimensions
-
Calculate layout dimensions for the Logo component.
-
calculateOptimalLeftWidth({required String welcomeMessage, required String truncatedCwd, required String modelLine})
→ int
-
Calculate optimal left panel width based on content.
-
formatModelAndBilling({required String modelName, required String billingType, required int availableWidth})
→ ({bool shouldSplit, String truncatedBilling, String truncatedModel})
-
Determine how to display model and billing info.
-
formatReleaseNoteForDisplay(String note, int maxWidth)
→ String
-
Format a release note for display.
-
formatWelcomeMessage(String? username)
→ String
-
Format a welcome message based on username.
-
getLayoutMode(int columns)
→ LayoutMode
-
Determine layout mode based on terminal width.
-
getSystemThemeName()
→ SystemTheme
-
Get the current terminal theme.
-
getTheme(ThemeName themeName)
→ NeomageTheme
-
Get a theme palette by name.
-
parseRgbColor(String themeColor)
→ Color?
-
Parse an RGB color string like "rgb(255,0,128)" into a Flutter Color.
-
resolveThemeSetting(ThemeSetting setting)
→ ThemeName
-
Resolve a ThemeSetting to a concrete ThemeName.
-
setCachedSystemTheme(SystemTheme theme)
→ void
-
Update the cached terminal theme (called by watcher on OSC 11 response).
-
themeFromOscColor(String data)
→ SystemTheme?
-
Parse an OSC color response data string into a theme.
-
truncatePath(String path, int maxLength)
→ String
-
Truncate a path in the middle if too long (width-aware).