prompter_maa 0.0.1

  • Changelog
  • Example
  • Installing
  • new47

0.0.1 #

  • Initial version, created by Stagehand

example/prompter_maa_example.dart

import 'package:prompter_maa/prompter_maa.dart';

void main() {
  final options = [
    Option('Red', '#ff0000'),
    Option('Blue', '#0000ff'),
    Option('Green', '#00ff00'),
    Option('White', '#ffffff'),
    Option('Black', '#000000'),
  ];

  final prompter = Prompter();
  var colorCode = prompter.askMultipleChoiceQuestion(
    'what is your favorite color?',
    options,
  );
  var answer = prompter.askYesNoQuestion('Do you like this library?');

  print(colorCode);
  print(answer);
}

Use this package as a library

1. Depend on it

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


dependencies:
  prompter_maa: ^0.0.1

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:prompter_maa/prompter_maa.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
10
Health:
Code health derived from static analysis. [more]
100
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
62
Overall:
Weighted score of the above. [more]
47
Learn more about scoring.

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

  • Dart: 2.8.4
  • pana: 0.13.15

Analysis suggestions

Package not compatible with runtime flutter-web on Web

Because:

  • package:prompter_maa/prompter_maa.dart that imports:
  • package:prompter_maa/src/prompter.dart that imports:
  • package:prompter_maa/src/terminal.dart that imports:
  • dart:io

Package not compatible with runtime js

Because:

  • package:prompter_maa/prompter_maa.dart that imports:
  • package:prompter_maa/src/prompter.dart that imports:
  • package:prompter_maa/src/terminal.dart that imports:
  • dart:io

Maintenance issues and suggestions

Make sure dartdoc successfully runs on your package's source files. (-10 points)

Running dartdoc failed with the following output: NoSuchMethodError: The getter 'attributes' was called on null. Receiver: null Tried calling: attributes

#0      Object.noSuchMethod (dart:core-patch/object_patch.dart:53:5)
#1      DartdocCustomizer._addPubPackageLink (package:pub_dev/dartdoc/customization.dart:168:17)
#2      DartdocCustomizer.customizeHtml (package:pub_dev/dartdoc/customization.dart:61:7)
#3      DartdocCustomizer.customizeFile (package:pub_dev/dartdoc/customization.dart:35:31)
<asynchronous suspension>
#4      DartdocCustomizer.customizeDir (package:pub_dev/dartdoc/customization.dart:26:25)
<asynchronous suspension>
#5      DartdocJobProcessor.process (package:pub_dev/dartdoc/dartdoc_runner.dart:211:14)
<asynchronous suspension>
#6      JobProcessor.run (package:pub_dev/job/job.dart:69:28)
<asynchronous suspension>
#7      JobMaintenance.run (package:pub_dev/job/job.dart:119:18)
#8      _workerMain.<anonymous closure> (package:pub_dev/service/entrypoint/dartdoc.dart:111:26)
#9      StackZoneSpecification._registerUnaryCallback.<anonymous closure>.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:26)
#10     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#11     StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:14)
#12     _rootRunUnary (dart:async/zone.dart:1192:38)
#13     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#14     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#15     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#16     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#17     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#18     _AsyncAwaitCompleter.complete (dart:async-patch/async_patch.dart:36:15)
#19     _completeOnAsyncReturn (dart:async-patch/async_patch.dart:298:13)
#20     DartdocJobProcessor.generateDocsForSdk (package:pub_dev/dartdoc/dartdoc_runner.dart)
#21     StackZoneSpecification._registerUnaryCallback.<anonymous closure>.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:26)
#22     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#23     StackZoneSpecification._registerUnaryCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:129:14)
#24     _rootRunUnary (dart:async/zone.dart:1192:38)
#25     _CustomZone.runUnary (dart:async/zone.dart:1085:19)
#26     _FutureListener.handleValue (dart:async/future_impl.dart:141:18)
#27     Future._propagateToListeners.handleValueCallback (dart:async/future_impl.dart:682:45)
#28     Future._propagateToListeners (dart:async/future_impl.dart:711:32)
#29     Future._completeWithValue (dart:async/future_impl.dart:526:5)
#30     Future._asyncComplete.<anonymous closure> (dart:async/future_impl.dart:556:7)
#31     StackZoneSpecification._run (package:stack_trace/src/stack_zone_specification.dart:209:15)
#32     StackZoneSpecification._registerCallback.<anonymous closure> (package:stack_trace/src/stack_zone_specification.dart:119:48)
#33     _rootRun (dart:async/zone.dart:1184:13)
#34     _CustomZone.run (dart:async/zone.dart:1077:19)
#35     _CustomZone.runGuarded (dart:async/zone.dart:979:7)
#36     _CustomZone.bindCallbackGuarded.<anonymous closure> (dart:async/zone.dart:1019:23)
#37     _microtaskLoop (dart:async/schedule_microtask.dart:43:21)
#38     _startMicrotaskLoop (dart:async/schedule_microtask.dart:52:5)
#39     _runPendingImmediateCallback (dart:isolate-patch/isolate_patch.dart:118:13)
#40     _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:169:5)

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 pre-v0.1 release. (-10 points)

While nothing is inherently wrong with versions of 0.0.*, it might mean that the author is still experimenting with the general direction of the API.

The package description is too short. (-8 points)

Add more detail to the description field of pubspec.yaml. Use 60 to 180 characters to describe the package, what it does, and its target use case.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK <3.0.0
Dev dependencies
pedantic ^1.9.0
test ^1.15.1