commander_ui 1.5.1 copy "commander_ui: ^1.5.1" to clipboard
commander_ui: ^1.5.1 copied to clipboard

Commander is a Dart library for creating user interfaces within the terminal.

example/main.dart

import 'dart:io';

import 'package:mansion/mansion.dart';

void main() async {
  stdout.writeAnsi(Clear.all);
  stdout.writeAnsi(CursorPosition.reset);
  await wait();

  // Move to (10, 10).
  stdout.writeln('Moving to (2, 10).');
  stdout.writeAnsi(const CursorPosition.moveTo(2, 10));
  stdout.writeln('Hello, World!');
  await wait();

  // Move to column 5.
  stdout.writeln('Moving to column 5.');
  stdout.writeAnsi(const CursorPosition.moveToColumn(5));
  await wait();

  // Move to the left.
  stdout.writeln('Moving to the right by 10.');
  stdout.writeAnsi(const CursorPosition.moveRight(10));
  stdout.writeln('Hello, World!');
  await wait();
}

Future<void> wait() => Future.delayed(const Duration(milliseconds: 300));
copied to clipboard
4
likes
0
points
105
downloads

Publisher

verified publisherleadcode.fr

Weekly Downloads

2024.09.10 - 2025.03.25

Commander is a Dart library for creating user interfaces within the terminal.

Repository (GitHub)
View/report issues

Topics

#cli #tui

License

unknown (license)

Dependencies

collection, mansion

More

Packages that depend on commander_ui