ka_dart_prompter 1.0.3

A Library to create CLI wizards

v 1.0.0 - v1 released


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');

Use this package as a library

1. Depend on it

Add this to your package's pubspec.yaml file:

  ka_dart_prompter: ^1.0.3

2. Install it

You can install packages from the command line:

with pub:

$ pub get

with Flutter:

$ flutter pub get

Alternatively, your editor might support pub get or flutter pub get. Check the docs for your editor to learn more.

3. Import it

Now in your Dart code, you can use:

import 'package:ka_dart_prompter/ka_dart_prompter.dart';
Describes how popular the package is relative to other packages. [more]
Code health derived from static analysis. [more]
Reflects how tidy and up-to-date the package is. [more]
Weighted score of the above. [more]
Learn more about scoring.

We analyzed this package on Feb 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.7.1
  • pana: 0.13.5

Health issues and suggestions

Document public APIs. (-1 points)

16 out of 16 API elements have no dartdoc comment.Providing good documentation for libraries, classes, functions, and other API elements improves code readability and helps developers find and use your API.

Format lib/ka_dart_prompter.dart.

Run dartfmt to format lib/ka_dart_prompter.dart.

Format lib/src/terminal.dart.

Run dartfmt to format lib/src/terminal.dart.

Maintenance issues and suggestions

Homepage URL isn't helpful. (-10 points)

Update the homepage field from pubspec.yaml: link to a website about the package or use the source repository URL.

Package is getting outdated. (-15.89 points)

The package was last published 60 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK <3.0.0