import 'dart:developer'; import 'package:dartterm/colors.dart'; import 'package:dartterm/terminal.dart'; void main() async { var descriptor = "generic"; while (true) { at(0, 0).clear(); at(0, 0).puts("Hello, bats!"); at(0, 2).fg(Palette.subtitle).small().puts("Beware of the bat!"); at(4, 4) .bg(Palette.subtitle) .fg(Palette.defaultBg) .big() .highlight() .act(Act( isDefault: true, label: "Strong!", callback: () async { log("strong!"); descriptor = "strong"; })) .act(Act( label: "Nocturnal!", callback: () async { log("nocturnal!"); descriptor = "nocturnal"; })) .puts("ALTER BAT"); at(4, 8).normal().puts("A $descriptor bat!"); // await zzz(1.0); await waitMenu(); } }