ka_dart_prompter 1.0.3

  • README.md
  • CHANGELOG.md
  • Example
  • Installing
  • Versions
  • 48

A Library to create CLI wizards

v 1.0.0 - v1 released

example/main.dart

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:


dependencies:
  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';
  
Version Uploaded Documentation Archive
1.0.3 Dec 13, 2018 Go to the documentation of ka_dart_prompter 1.0.3 Download ka_dart_prompter 1.0.3 archive
1.0.2 Dec 13, 2018 Go to the documentation of ka_dart_prompter 1.0.2 Download ka_dart_prompter 1.0.2 archive
1.0.1 Dec 13, 2018 Go to the documentation of ka_dart_prompter 1.0.1 Download ka_dart_prompter 1.0.1 archive
1.0.0 Dec 13, 2018 Go to the documentation of ka_dart_prompter 1.0.0 Download ka_dart_prompter 1.0.0 archive
0.0.1 Dec 13, 2018 Go to the documentation of ka_dart_prompter 0.0.1 Download ka_dart_prompter 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
99
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
90
Overall:
Weighted score of the above. [more]
48
Learn more about scoring.

We analyzed this package on Jun 17, 2019, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.3.2
  • pana: 0.12.18

Platforms

Detected platforms: Flutter, other

Primary library: package:ka_dart_prompter/ka_dart_prompter.dart with components: io.

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.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK <3.0.0