ask_terminal 0.1.2

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

Ask Terminal v0.1.2

Library to create CLI wizards based on binary questions (yes/no), and mutliple choice questions with custom values

    import 'package:ask_terminal/ask_terminal.dart';

    void main() {
        String colorCode = prompter.askMultiple('What color do you like?', [
            new Option('white', '#ffffff'),
            new Option('black', '#000000'),
            new Option('red', '#ff0000'),
            new Option('green', '#00ff00'),
            new Option('blue', '#0000ff'),
        ]); // returns option.value (ex: '#ffffff')
        bool learnDart = prompter.askBinary('Do you want to learn Dart for Web?'); // retruns bool (ex: true)

        print('liked color: $colorCode');
        print('I want to learn dart: $learnDart');
    }

Changelog

All notable changes to this project will be documented in this file.

[0.1.2] - 2018-11-20

Changed

  • dartfmt ask_terminal.dart
  • dartfmt src/option.dart

[0.1.1] - 2018-11-20

Added

Changed

  • Change main.dart example

[0.1.0] - 2018-11-20

Changed

  • Update description within readme and pubspec.yaml files

[0.0.1] - 2018-11-20

Added

  • init the pub lib and add all the necessary files
  • write the business logic behind ask_terminal

example/main.dart

import 'package:ask_terminal/ask_terminal.dart';

void main() {
  String colorCode = prompter.askMultiple('What color do you like?', [
    new Option('white', '#ffffff'),
    new Option('black', '#000000'),
    new Option('red', '#ff0000'),
    new Option('green', '#00ff00'),
    new Option('blue', '#0000ff'),
  ]); // returns option.value (ex: '#ffffff')


  bool learnDart = prompter.askBinary('Do you want to learn Dart for Web?'); // retruns bool (ex: true)

  print('liked color: $colorCode');
  print('I want to learn dart: $learnDart');
}

Use this package as a library

1. Depend on it

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


dependencies:
  ask_terminal: ^0.1.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

with Flutter:


$ flutter packages get

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

3. Import it

Now in your Dart code, you can use:


import 'package:ask_terminal/ask_terminal.dart';
  
Version Uploaded Documentation Archive
0.1.2 Nov 20, 2018 Go to the documentation of ask_terminal 0.1.2 Download ask_terminal 0.1.2 archive
0.1.1 Nov 20, 2018 Go to the documentation of ask_terminal 0.1.1 Download ask_terminal 0.1.1 archive
0.1.0 Nov 20, 2018 Go to the documentation of ask_terminal 0.1.0 Download ask_terminal 0.1.0 archive
0.0.1 Nov 20, 2018 Go to the documentation of ask_terminal 0.0.1 Download ask_terminal 0.0.1 archive
Popularity:
Describes how popular the package is relative to other packages. [more]
13
Health:
Code health derived from static analysis. [more]
90
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
100
Overall:
Weighted score of the above. [more]
53
Learn more about scoring.

We analyzed this package on Dec 5, 2018, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.1.0
  • pana: 0.12.7

Platforms

Detected platforms: Flutter, other

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

Health issues and suggestions

Document public APIs (-10 points)

7 out of 7 API elements (library, class, field or method) have no adequate dartdoc content. Good documentation improves code readability and discoverability through search.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK <3.0.0