dascade library
Dascade — Dart ASCII Console Application Development Environment.
Dascade is a lightweight, immediate-mode terminal UI framework for Dart. It provides buffered and differential rendering, ANSI color support, and a simple, expressive API for building performant terminal-based applications.
Dascade is designed to be:
- Immediate-mode and stateless at the API level
- Efficient through buffered and differential rendering
- Portable across macOS, Linux, and Windows terminals
- Minimal in dependencies and runtime overhead
Import this library to access the public Dascade API:
import 'package:dascade/dascade.dart';
Classes
- Dascade
- Stable public API facade for Dascade.
- DascadeCell
- A cell is represented as a single 64-bit integer containing glyph, color, and style information. Buffers store raw integers; this class provides helpers to encode and decode cell state.
- DascadeFramework
- The main interface of Dascade. All framework calls should be made through this object.
- DascadeUI
- Root entry point for building and rendering immediate-mode UI in Dascade.
- DUButton
- A focusable, interactable button. See example/ui/button.dart for usage.
- DUElement
- Base interface for all UI elements in the Dascade system.
- DUIColor
- Immutable ANSI style (256-color fg/bg + bold).
- DUITheme
- Theme used to style elements.
- DULayout
- A high-level, child-count-agnostic layout rule.
- DUList
- A scrollable, unbounded virtual space to assemble an arbitrary list of fixed-size elements.
- DUNative
- A rendering plane element that provides a local coordinate system.
- DUPoint
- Basic geometry class used across the Dascade UI system.
- DURadio
- A focusable, interactable radio element. See example/ui/radio.dart for usage.
- DURect
- Rectangular region used for layout, clipping, and hit testing in the Dascade UI system.
- DURenderer
- Immediate-mode renderer for UI elements in Dascade.
- DURuntime
- Manages per-frame input state for the Dascade UI system.
- DUSpacer
- A layout-only element that fills its rect with a solid color.
- DUTextBox
- A multi-line editable or read-only text box widget for Dascade UI.
Extensions
- DURendererUtils on DURenderer
- Static utilities for immediate-mode rendering of UI elements in Dascade.
Typedefs
-
DascadeApp
= Future<
void> Function(DascadeFramework d) - DUNativeDraw = void Function(int width, int height, DURenderer renderer)
- Per-frame draw callback signature.