update method
Implementation
TerminalThemeState update(Msg msg) {
return switch (msg) {
ForegroundColorMsg(hex: final hex) => TerminalThemeState(
foregroundHex: hex,
backgroundHex: backgroundHex,
cursorHex: cursorHex,
hasDarkBackground: hasDarkBackground,
),
BackgroundColorMsg(hex: final hex) => _withBackgroundHex(hex),
CursorColorMsg(hex: final hex) => TerminalThemeState(
foregroundHex: foregroundHex,
backgroundHex: backgroundHex,
cursorHex: hex,
hasDarkBackground: hasDarkBackground,
),
_ => this,
};
}