Prompts question to a terminal and sends response values back to the calling program.

Getting Started

Include the prompter library in your project. To use the prompter you can make an instance of it by calling Prompter(). You can pass multiple choice questions or simple yes-no questions as arguments to the prompter functions and make use of the returned value in your program.

The value returned have the type string for multiple questions and boolean for yes-no questions.


Must have Dart version 2.0 or greater since the keyword new is not used in class constructors.


dev_dependencies: prompter_bruno: ^3.0.0

Running the tests

import 'package:prompter_bruno/prompter_bruno.dart';

final List

// No need to use the 'new' keyword with Dart 2.0 or greater final prompter = Prompter();

// Pass a multi-choice question and return String value String colorCode = prompter.askMultiple('Select a color', options);

// Pass a yes-no question and return a boolean value bool answer = prompter.askYesNo('Do you like this lib?');

// Print the values if needed to confirm results print(colorCode); print(answer);

Built With

Visual Studio Code - version 1.33.1


  • Bruno


This project is licensed under the MIT License


  • Prompter is part of a code project given by Stephen Grider.