terminal library

Provides the main interface of this package, Surface, and related types.

import 'package:dt/terminal.dart';

void main() {
  final terminal = Surface.fromStdio();
  terminal.draw((frame) {
    frame.draw((buffer) {
      buffer.print(0, 0, 'Hello, World!');
    });
  });
  terminal.dispose();
}

Classes

Frame
A consistent view into a terminal state for rendering a single frame.
Key
A type representing a key on the keyboard.
Keyboard
A keyboard that can be used to input text or detect key presses.
Surface
An interface to interact and draw Frames on a terminal.

Enums

AsciiControlKey
A control key on the keyboard.
AsciiPrintableKey
A printable ASCII key on the keyboard.