utilary 1.0.9

  • Readme
  • Changelog
  • Installing
  • 60

A very simple package containing utility classes that I use in my other project.

1.0.9 #

  • Overriding getter hashCode in class Vector.

1.0.8 #

  • Fixed an error with Vector class: getter nearestDirection moved to base class.
  • Added unit tests.

1.0.7 #

  • Add getter nearestDirection.

1.0.6 #

  • Subdivide Vector class into Vector and Direction.
  • Add static const Cardinals.
  • Add getter kingLength.
  • Add getter rookLength.

1.0.5 #

  • Fix an error with rng.range function.
  • Formatted everything.

1.0.4 #

  • Fix an error with Rectangle.fromTopLeftBottomRight constructor.

1.0.3 #

  • Array2D can be inizialized in construction through Array2D.generated(Function).
  • Add Array2D.bounds.

1.0.2 #

  • Remove color.dart. It's not related to this package.

1.0.1 #

  • Add CHANGELOG.md
  • Add return statement to distanceTo.
  • Fix exports.
  • Formatted everything with dartfmt.

Use this package as a library

1. Depend on it

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


dependencies:
  utilary: ^1.0.9

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

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

  • Dart: 2.5.1
  • pana: 0.12.21

Platforms

Detected platforms: Flutter, web, other

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

Health suggestions

Fix lib/src/vector.dart. (-9.54 points)

Analysis of lib/src/vector.dart reported 20 hints, including:

line 25 col 7: DO use curly braces for all flow control structures.

line 33 col 7: DO use curly braces for all flow control structures.

line 41 col 7: DO use curly braces for all flow control structures.

line 49 col 7: DO use curly braces for all flow control structures.

line 57 col 7: DO use curly braces for all flow control structures.

Fix lib/src/rectangle.dart. (-2.96 points)

Analysis of lib/src/rectangle.dart reported 6 hints, including:

line 79 col 7: DO use curly braces for all flow control structures.

line 84 col 7: DO use curly braces for all flow control structures.

line 98 col 40: DO use curly braces for all flow control structures.

line 101 col 44: DO use curly braces for all flow control structures.

line 104 col 45: DO use curly braces for all flow control structures.

Fix lib/src/array2d.dart. (-2.48 points)

Analysis of lib/src/array2d.dart reported 5 hints:

line 19 col 7: DO use curly braces for all flow control structures.

line 19 col 46: DO use curly braces for all flow control structures.

line 34 col 34: DO use curly braces for all flow control structures.

line 36 col 34: DO use curly braces for all flow control structures.

line 38 col 34: DO use curly braces for all flow control structures.

Fix lib/src/rng.dart. (-1.49 points)

Analysis of lib/src/rng.dart reported 3 hints:

line 41 col 7: DO use curly braces for all flow control structures.

line 43 col 7: DO use curly braces for all flow control structures.

line 45 col 7: DO use curly braces for all flow control structures.

Maintenance suggestions

Maintain an example. (-10 points)

Create a short demo in the example/ directory to show how to use this package.

Common filename patterns include main.dart, example.dart, and utilary.dart. Packages with multiple examples should provide example/README.md.

For more information see the pub package layout conventions.

Dependencies

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