flterm 0.0.5
flterm: ^0.0.5 copied to clipboard
Flutter terminal widget on top of Ghostty's libghostty-vt engine.
Changelog #
0.0.5 #
Added #
- Clipboard writes:
TerminalController.onClipboardWriteforwards atomic, binary-safe OSC 52 and iTerm2 clipboard requests so applications can apply their own platform and security policies. If the callback throws, the initiating write finishes terminal processing before rethrowing the error. - Idle scrollback compression: attached terminal views schedule bounded compression after terminal and viewport activity settles, reducing retained scrollback memory without competing with rendering.
Changed #
- Kitty graphics caching: unchanged placement snapshots are reused across frames, while image generations invalidate cached images and stale pending decodes. This avoids repeated traversal, sorting, and eviction work without displaying stale image data.
- Color behavior:
ColorPalette.generated()uses libghostty palette generation, and terminal color-scheme reports use perceived background luminance. - Published package contents: tests, benchmark tooling, generated API documentation, build outputs, and coverage data are excluded.
Fixed #
- IME preedit layout: ZWJ emoji, skin-tone emoji sequences, combining marks, and variation selectors are measured as grapheme clusters using libghostty's terminal width rules.
- Viewport scrolling: scroll-controller pixel offsets map to absolute terminal rows regardless of the current viewport position.
- Windows text input: platform text input binds to the
TerminalView's owning Flutter view and reconnects when that view changes.
0.0.4 #
Breaking #
- Selection APIs: selection is backed by libghostty.
TerminalSelectionandTerminalSelectionModeare removed,TerminalConfig.wordPatternmoves toTerminalGestureSettings.wordBoundaries, and gesture toggles are explicit settings.
Added #
- Terminal links:
TerminalView.linkSettingsdetects OSC 8 links, text URLs, file paths, and custom regex links. - Controller APIs:
selectRange,hasSelection,pwd, andonPwdChangedexpose selection and working-directory state. - Glyph Protocol:
TerminalConfig.glyphProtocoltoggles Glyph Protocol APC handling.
Changed #
- Rendering pipeline: selection, cursor viewport state, and cell metadata use refreshed libghostty render snapshots.
0.0.3 #
Breaking #
- Flutter SDK floor: requires Dart 3.12 and Flutter 3.44.
Added #
- IME composition: composing text appears at the terminal cursor and works with platform text input.
- Sprite glyph rendering: box drawing, block elements, Braille, Powerline, geometric shapes, and legacy computing glyphs render with built-in glyphs.
- Shared render caches:
TerminalScopelets multiple terminal views share compatible rendering resources. - APC buffer limits:
TerminalConfig.apcBufferLimitcontrols how much APC payload data the terminal accepts.
Changed #
- Rendering pipeline: terminal frames share rendering caches and do less repeated work between frames.
Fixed #
- Keyboard input: shifted printable keys and IME editing produce the expected terminal text.
- Rendering accuracy: erased backgrounds, cursor shape, cell metrics, and sprite glyphs render more consistently.
0.0.2 #
Breaking #
- Theme colors move into
ColorPalette:TerminalThemeno longer takesbackground,foreground, andansiColorsdirectly. Build aColorPaletteonce and pass it in, so palettes are something you can share, swap, orcopyWithon their own. - Cursor and selection colors can adapt to the cell under them: the
color fields take
DynamicColor?now. UseDynamicColor.cellForeground()/.cellBackground()to follow the cell, orDynamicColor.fixed(c)for the old static behavior. selectedTextis a method: callcontroller.selectedText()for plain text, or pass aFormatterFormatto get VT or HTML for rich-clipboard copy.- Bold no longer switches to the bright palette by default: expect
slightly different bold colors; set
boldIsBright: trueto restore the old behavior.
Added #
- Kitty graphics: programs that emit images (previewers, image
viewers, some editors) render inside the widget. Cap the cache via
TerminalConfig.kittyImageStorageLimit; zero disables. - Transparent background:
TerminalTheme.backgroundOpacitymakes the default background translucent so the terminal can compose over a translucent window or other widgets.backgroundOpacityCellsextends it to cells with their own bg color. - More theme knobs:
CursorTheme.text(glyph color under a block cursor),TerminalTheme.boldColor(forced bold color), andSelectionTheme.foreground(selected-glyph tint). ColorPalette.generated(): derives indices 16–255 from your base 16 plus background and foreground so the extended palette blends instead of clashing with the fixed xterm cube.
Changed #
- Dirty-row rendering: frames rebuild only rows that changed, so idle terminals cost much less CPU.
0.0.1 #
Initial release.
Added #
TerminalView: a Flutter widget that renders a terminal and adapts its input to the host. Mouse and keyboard on desktop, touch and soft keyboard on mobile, both on web.TerminalController: owns the terminal and bridges it with the view. Connects to a backend (PTY, SSH, socket) viaonOutput,onResize,onBell, andonTitleChanged. Exposes I/O (write,sendText,sendKey), selection (selectAll,selectWord,selectLine), focus, scrolling, paste, clear, and mode toggling.- Themes: ANSI 16, 256-color, and truecolor palettes; cursor
shape, color, and blink; hyperlink style; font family, size, and
fallback; minimum contrast. Immutable and
lerp-able. - Wide characters: CJK, color emoji, VS16, and combining marks render correctly; selection snaps to whole cells.
- Mouse selection: drag, double-click word, triple-click line,
and Alt+drag block. Configurable via
TerminalGestureSettings. - Shortcuts: built-in copy, paste, select all, and clear with
platform-aware defaults (Cmd on macOS/iOS, Ctrl+Shift on
Linux/Windows). Extend or replace with any Flutter
Intent. - OSC 8 hyperlinks: idle and highlighted styles with click hit-testing.
- Cross-platform: Android, iOS, Linux, macOS, Web (WASM), Windows.