ka_dart_prompter 1.0.1 copy "ka_dart_prompter: ^1.0.1" to clipboard
ka_dart_prompter: ^1.0.1 copied to clipboard

outdated

Library to create CLI wizards. The Prompter() class can be used to create both multiple-choice and binary querstions

example/main.dart

import 'package:ka_dart_prompter/ka_dart_prompter.dart';

void main() {
  final prompter = Prompter();
  final options = [
    Option('I want red', '#f00'),
    Option('I want blue', '#00f'),
  ];
  String colorCode = prompter.askMultiple('Which color do you want?', options);
  bool answer = prompter.askBinary('Do you like this lib?');
  String result = answer ? 'like' : 'do not like';
  print('Your chosen color code is $colorCode, your $result this library');
}
0
likes
0
pub points
0%
popularity

Publisher

unverified uploader

Library to create CLI wizards. The Prompter() class can be used to create both multiple-choice and binary querstions

Homepage

License

unknown (LICENSE)

More

Packages that depend on ka_dart_prompter