CLI_Dialog constructor

CLI_Dialog({
  1. List? messages,
  2. List? questions,
  3. List? booleanQuestions,
  4. List? listQuestions,
  5. List<String>? order,
  6. bool trueByDefault = false,
  7. bool navigationMode = false,
  8. String? resume = '',
})

This is the default constructor to create a CLI Dialog You can pass lists of normal questions, booleanQuestions, listQuestions. All these named parameters are optional as long as at least one of them is given. Furthermore you can pass a particular order. If no order is given then the default order is used (see README.md) There is also trueByDefault (false by default) which indicates how booleanQuestions behave if no input is given There are basic format checks which try to prevent you from passing invalid argmuents.

Implementation

CLI_Dialog(
    {this.messages,
    this.questions,
    this.booleanQuestions,
    this.listQuestions,
    this.order,
    this.trueByDefault = false,
    this.navigationMode = false,
    this.resume = ''}) {
  _checkQuestions();
  _initializeLists();
}