CliDialog.std constructor
CliDialog.std(
- StdinService _stdInput,
- StdoutService _stdOutput, {
- List? messages,
- List? questions,
- List? booleanQuestions,
- List? listQuestions,
- List<
String> ? order, - bool trueByDefault = false,
This named constructor should mostly be used when unit testing.
var std_output = StdoutService(mock: true);
var std_input = StdinService(mock: true, informStdout: std_output);
std_input.addToBuffer(...Keys.arrowDown, Keys.enter);
final dialog = CLI_Dialog.std(std_input, std_output, listQuestions: listQuestions);
Implementation
CliDialog.std(
this._stdInput,
this._stdOutput, {
this.messages,
this.questions,
this.booleanQuestions,
this.listQuestions,
this.order,
this.trueByDefault = false,
this.navigationMode = false,
}) {
_checkQuestions();
_initializeLists();
}