ka_dart_prompter 1.0.1 ka_dart_prompter: ^1.0.1 copied to clipboard
Library to create CLI wizards. The Prompter() class can be used to create both multiple-choice and binary querstions
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');
}