stats 0.2.0+2

Build Status Pub

import 'package:stats/stats.dart';

main() {
  var input = [1, 2, 3, 4, 5, 6, 7, 8];
  print("Input: $input");
  var stats = Stats.fromData(input);
  // {count: 8, mean: 4.5, median: 4.5, max: 8, min: 1, standardDeviation: 2.29}
  print(stats.withPrecision(3));
}

0.2.0+2 #

  • Support latest package:json_annotation.

0.2.0+1 #

  • Fix readme.

0.2.0 #

  • Initial release.

example/example.dart

import 'package:stats/stats.dart';

main() {
  var input = [1, 2, 3, 4, 5, 6, 7, 8];
  print("Input: $input");
  var stats = Stats.fromData(input);
  // {count: 8, mean: 4.5, median: 4.5, max: 8, min: 1, standardDeviation: 2.29}
  print(stats.withPrecision(3));
}

Use this package as a library

1. Depend on it

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


dependencies:
  stats: ^0.2.0+2

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:stats/stats.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
64
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]
80
Learn more about scoring.

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

  • Dart: 2.4.0
  • pana: 0.12.19

Platforms

Detected platforms: Flutter, web, other

No platform restriction found in primary library package:stats/stats.dart.

Health issues and suggestions

Document public APIs. (-1 points)

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

Maintenance issues and suggestions

Support latest dependencies. (-10 points)

The version constraint in pubspec.yaml does not support the latest published versions for 1 dependency (json_annotation).

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.0.0 <3.0.0
json_annotation >=1.2.0 <3.0.0 2.4.0 3.0.0
Dev dependencies
build_runner ^1.0.0
build_verify ^1.1.0
json_serializable ^2.0.0
pedantic ^1.2.0
test ^1.3.0