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 BatchCmd 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
- ClearScreenMsg
- ClipboardMsg
- ColorProfileMsg
- ConfirmCancelledMsg
- ConfirmResultMsg
- CursorBlinkMsg
- CursorColorMsg
- CustomMsg
- DisableBracketedPasteMsg
- DisableMouseMsg
- DisableReportFocusMsg
- EnableBracketedPasteMsg
- EnableMouseAllMotionMsg
- EnableMouseCellMotionMsg
- EnableReportFocusMsg
- EnterAltScreenMsg
- ExecProcessMsg
- ExitAltScreenMsg
- FilePickerErrorMsg
- FilePickerReadDirMsg
- FilterMatchesMsg
- FocusMsg
- ForegroundColorMsg
- FrameTickMsg
- HideCursorMsg
- InterruptMsg
- KeyboardEnhancementsMsg
- KeyMsg
- MouseMsg
- MultiSelectionMadeMsg
- PasswordCancelledMsg
- PasswordSubmittedMsg
- PasteErrorMsg
- PasteMsg
- PasteMsg
- PrintLineMsg
- ProgressBarMsg
- ProgressFrameMsg
- QuitMsg
- RenderMetricsMsg
- RepaintMsg
- RepaintRequestMsg
- RequestWindowSizeMsg
- ResumeMsg
- SearchCancelledMsg
- SearchSelectionMadeMsg
- SelectionCancelledMsg
- SelectionMadeMsg
- SetWindowTitleMsg
- ShowCursorMsg
- SpinnerTickMsg
- StatusMessageTimeoutMsg
- StopwatchResetMsg
- StopwatchStartStopMsg
- StopwatchTickMsg
- SuspendMsg
- TerminalVersionMsg
- TextAreaPasteErrorMsg
- TextAreaPasteMsg
- TickMsg
- TimerStartStopMsg
- TimerTickMsg
- TimerTimeoutMsg
- UvEventMsg
- WindowSizeMsg
- WizardCancelledMsg
- WizardCompletedMsg
- WizardStepCompletedMsg
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