fortune 0.1.0

fortune-dart #

A dart library for retrieving fortunes.

Usage #

A simple usage example:

import 'package:fortune/fortune.dart';

main() {
  var fortune = new FortuneFromData();

Features and bugs #

Please file feature requests and bugs at the issue tracker.

Changelog #

0.1.0 #

  • Update to Dart SDK 2.0

0.0.1 #

  • Initial version


// Copyright (c) 2017, 'rinukkusu'. All rights reserved. Use of this source code
// is governed by a BSD-style license that can be found in the LICENSE file.

import 'package:fortune/fortune.dart';

main() {
  var fortune = new FortuneFromData();

Use this package as a library

1. Depend on it

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

  fortune: ^0.1.0

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:fortune/fortune.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 13, 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)

8 out of 8 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.

Fix lib/src/fortune_from_data.dart. (-0.50 points)

Analysis of lib/src/fortune_from_data.dart reported 1 hint:

line 7 col 20: Unnecessary new keyword.

Fix lib/src/fortune_from_syscall.dart. (-0.50 points)

Analysis of lib/src/fortune_from_syscall.dart reported 1 hint:

line 9 col 21: Unnecessary new keyword.

Format lib/fortune.dart.

Run dartfmt to format lib/fortune.dart.

Maintenance issues and suggestions

Use analysis_options.yaml. (-10 points)

Change the name of your package's .analysis_options file to analysis_options.yaml.

Read more about the setup of analysis-options.yaml.

Fix .analysis_options.

The analyzer can't parse .analysis_options.

The package description is too short. (-20 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.

Package is getting outdated. (-6.85 points)

The package was last published 55 weeks ago.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
Dev dependencies
test ^1.3.0