dart_lcg 0.1.2

  • Readme
  • Changelog
  • Example
  • Installing
  • 38

Dart LCG #

Basic linear congruential generator written in dart to get a feel of the dart programming language.

Inspired by SENG475 assignment 1, I tried to adhere to the api specifications in that assignments.

0.1.2 linking to github

0.1.1 updating version

0.1.0 INITIAL RELEASE

example/example.dart

import 'package:dart_lcg/lcg/lcg.dart';
void main() {
  LCG test = new LCG(5,4,3,2);
}

Use this package as a library

1. Depend on it

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


dependencies:
  dart_lcg: ^0.1.2

2. Install it

You can install packages from the command line:

with pub:


$ pub get

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

3. Import it

Now in your Dart code, you can use:


import 'package:dart_lcg/lcg.dart';
import 'package:dart_lcg/lcg/lcg.dart';
import 'package:dart_lcg/lcg/lcg_interface.dart';
  
Popularity:
Describes how popular the package is relative to other packages. [more]
0
Health:
Code health derived from static analysis. [more]
74
Maintenance:
Reflects how tidy and up-to-date the package is. [more]
80
Overall:
Weighted score of the above. [more]
38
Learn more about scoring.

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

  • Dart: 2.7.1
  • pana: 0.13.6

Health issues and suggestions

Fix lib/lcg/lcg.dart. (-25.38 points)

Analysis of lib/lcg/lcg.dart failed with 1 error, 1 hint:

line 58 col 16: 'LCG.==' ('bool Function(LCG)') isn't a valid override of 'Object.==' ('bool Function(dynamic)').

line 19 col 3: Avoid return types on setters.

Fix lib/lcg/lcg_interface.dart. (-0.50 points)

Analysis of lib/lcg/lcg_interface.dart reported 1 hint:

line 16 col 3: Avoid return types on setters.

Format lib/lcg.dart.

Run dartfmt to format lib/lcg.dart.

Maintenance issues and suggestions

No valid SDK. (-20 points)

The analysis could not detect a valid SDK that can use this package.

Dependencies

Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.2.0 <3.0.0
Dev dependencies
test ^1.9.2