dartprompt_sg 0.0.1
dartprompt_sg: ^0.0.1 copied to clipboard

for implementing library

example/main.dart

import 'package:dartprompt_sg/dartprompt_sg.dart';

void main() {
  //var terminal = Terminal();

  List<Option> dataOptions = [
    // Option(
    //   label: "This is label",
    //   value: "this is value",
    // ),
    // Option(label: "this is second", value: 'this is second value'),
  ];

  dataOptions.add(Option(label: "this is first lable", value: "this is value"));
  dataOptions.add(
      Option(label: "this is second lable", value: "this is second value"));
  //terminal.printOptions(dataOptions);

  final prompt = Prompter();
  final String firstQuestion =
      prompt.askQuestion('Do you like Color?', dataOptions);
  final userInput = prompt.askYesOrNo('Do you like me?');
  print(firstQuestion);
  print(userInput);

  // Map<String, Option> options = {
  //   'Question1': Option('1', "this is First value"),
  //   'Question2': Option('2', "this is Second value"),
  // };
  //terminal.printOptions(dataOptions);

  //var output = terminal.collectInput();
  //print(output);
}
0
likes
60
pub points
0%
popularity

for implementing library

Homepage

Documentation

API reference

License

unknown (LICENSE)

More

Packages that depend on dartprompt_sg