Msg class abstract TUI
Base class for all messages in the TUI runtime.
Messages represent events that can trigger state updates in a Model. All message types should extend this class.
- Msg: Represents an event (key press, timer tick, network response).
- Cmd: Represents an effect to be performed by the runtime (quitting, sending a message, running an external process).
Use BatchMsg to group multiple messages, and Cmd.batch to group multiple
commands.
Built-in Message Types
- KeyMsg - Keyboard input events
- MouseMsg - Mouse events (clicks, motion, wheel)
- WindowSizeMsg - Terminal resize events
- TickMsg - Timer tick events
- QuitMsg - Internal quit signal
- BatchMsg - Multiple messages bundled together
Custom Messages
Create custom message types by extending Msg:
class DataLoadedMsg extends Msg {
final List<String> items;
DataLoadedMsg(this.items);
}
class ErrorMsg extends Msg {
final String message;
ErrorMsg(this.message);
}
- Implementers
- BackgroundColorMsg
- BatchMsg
- CapabilityMsg
- CellSizeMsg
- ClearScreenMsg
- ClipboardMsg
- ClipboardSetMsg
- ColorPaletteMsg
- ColorProfileMsg
- ColorSchemeMsg
- ConfirmCancelledMsg
- ConfirmResultMsg
- CursorBlinkMsg
- CursorColorMsg
- CursorPositionMsg
- CustomMsg
- DataTableSelectionMadeMsg
- DisableBracketedPasteMsg
- DisableMouseMsg
- DisableReportFocusMsg
- EnableBracketedPasteMsg
- EnableMouseAllMotionMsg
- EnableMouseCellMotionMsg
- EnableReportFocusMsg
- EnterAltScreenMsg
- ExecProcessMsg
- ExitAltScreenMsg
- FilePickerErrorMsg
- FilePickerReadDirMsg
- FilterMatchesMsg
- FocusMsg
- ForegroundColorMsg
- FrameTickMsg
- HideCursorMsg
- HitTestMouseMsg
- InterruptMsg
- KeyboardEnhancementsMsg
- KeyMsg
- ModeReportMsg
- ModifyOtherKeysMsg
- MouseMsg
- MultiSearchSelectionMadeMsg
- MultiSelectionMadeMsg
- NumberCancelledMsg
- NumberSubmittedMsg
- PasswordCancelledMsg
- PasswordSubmittedMsg
- PasteErrorMsg
- PasteMsg
- PasteMsg
- PrimaryDeviceAttributesMsg
- PrintLineMsg
- ProgressBarMsg
- ProgressFrameMsg
- QuitMsg
- RenderBudgetMsg
- RenderMetricsMsg
- RepaintMsg
- RepaintRequestMsg
- ReplayEventMsg
- RequestWindowSizeMsg
- ResumeMsg
- SearchCancelledMsg
- SearchSelectionMadeMsg
- SecondaryDeviceAttributesMsg
- SelectionCancelledMsg
- SelectionMadeMsg
- SetWindowTitleMsg
- ShowCursorMsg
- SpinnerTickMsg
- StatusMessageTimeoutMsg
- StopwatchResetMsg
- StopwatchStartStopMsg
- StopwatchTickMsg
- SuggestCancelledMsg
- SuggestSubmittedMsg
- SuspendMsg
- TerminalVersionMsg
- TertiaryDeviceAttributesMsg
- TextAreaPasteErrorMsg
- TextAreaPasteMsg
- TickMsg
- TimerStartStopMsg
- TimerTickMsg
- TimerTimeoutMsg
- UvEventMsg
- WindowPixelSizeMsg
- WindowSizeMsg
- WizardCancelledMsg
- WizardCompletedMsg
- WizardStepCompletedMsg
- ZoneInBoundsMsg
Constructors
- Msg()
-
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited