flterm library
Flutter terminal renderer powered by libghostty.
import 'package:flterm/flterm.dart';
Classes
- ColorPalette
- The default background, foreground, and 256-color palette for a terminal.
- CursorTheme
- The visual style of the terminal cursor.
- DeviceAttributesResponse
- Response data for device attributes queries (DA1/DA2/DA3).
- DynamicColor
- A color that resolves at paint time against a specific cell.
- Formatter
- Formats terminal content as plain text, VT sequences, or HTML.
- FormatterExtra
- Extra terminal and screen state to include in formatted output.
- HyperlinkStyle
- Visual properties for hyperlinks in a single interaction state.
- HyperlinkTheme
- Hyperlink appearance for idle and highlighted states.
- Scrollbar
- Scrollbar position and dimensions for the terminal viewport.
- SelectionTheme
- Selection highlight colors. See DynamicColor for per-cell variants.
- TerminalConfig
- Terminal behavior configuration.
- TerminalController
- Manages a terminal instance and bridges it with TerminalView.
- TerminalGestureSettings
- Controls which selection gestures are enabled and how they behave.
- TerminalScope
- Shares terminal resources across descendant TerminalView widgets.
- TerminalScrollController
- Scroll controller for TerminalView.
- TerminalScrollPosition
- Scroll position used by TerminalScrollController.
- TerminalSelection
- A selected range of terminal cells.
- TerminalTheme
- Visual configuration for a terminal.
- TerminalView
- Displays a terminal and handles user interaction.
Enums
- FormatterFormat
- Output format.
- GestureModifier
- A modifier key used to trigger gesture behaviors.
- Key
- Physical key codes.
- KeyboardState
- Soft keyboard visibility state on mobile platforms.
- LineSelectMode
- How triple-click line selection determines the end column.
- MouseAutoHide
- Controls when the mouse cursor hides during terminal interaction.
- ScrollToBottom
- When to auto-scroll the viewport to the bottom.
- SelectionGesture
- A type of selection gesture recognized by the gesture detector.
- TerminalScreen
- Terminal screen identifier.
- TerminalSelectionMode
- How a selection region is shaped.
Extension Types
- Mods
- Keyboard modifier keys bitmask tracking which modifiers are pressed and, where supported by the platform, which side (left or right) is active.
- TerminalMode
- A packed 16-bit terminal mode identifier (DEC private or ANSI).
Functions
-
initializeForWeb(
Uri wasmUri) → Future< void> - Loads the libghostty-vt WASM module and initializes bindings for web use.
Typedefs
- CursorShape = RenderStateCursorVisualStyle
- Visual style of the cursor.
- MouseTracking = MouseTrackingMode
- Mouse tracking mode.
- OnResize = void Function(int cols, int rows)
- Callback for terminal grid resize events.
- UnderlineStyle = SgrUnderline
- Underline style types.