measurement 0.0.1

  • Readme
  • Changelog
  • Installing
  • 44

measurement #

Dart CI - deploy

Dart library for handling units and values

Installation #

Usage #


Common utilities #

    DistanceUnit.KILOMETRES, DistanceUnit.YARD, 1.34) // 1465.4374

Modelling distance and conversion #

Distance distance = Distance(1.34, DistanceUnit.KILOMETRES);
distance.getValue(DistanceUnit.METRES); // 1340
distance.convert(DistanceUnit.METRES);  // Distance(1340, DistanceUnit.METRES)

Design #

Default #

To avoid confusion among developers, there is no default unit for a measurement. Unit must be consciously supplied. If unit is known before hand, to avoid calculation measurements can be standardized.

Functional programming #

Conversions are as far as possible generated before hand, best during compilation. Functions are looked up with O(1) complexity.

Contribution #


For help getting started with Flutter, view our online documentation, which offers tutorials, samples, guidance on mobile development, and a full API reference.

[0.0.1] - 20200310 #

  • release

[0.0.1-docs-readme] - 20200309 #

  • add status badge
  • add url

[0.0.1-docs-b] - 20200309 #

  • ci/cd remove deploy pipeline on PR to integration

[0.0.1-docs] - 20200309 #

  • write docs
  • add equality operator and checks

[0.0.1-integration-to-master-e] - 20200309 #

  • abandon git merge on release

[0.0.1-integration-to-master-d] - 20200309 #

  • fix git commands

[0.0.1-integration-to-master-c] - 20200309 #

  • fix git commands

[0.0.1-integration-to-master-b] - 20200309 #

  • minor fix

[0.0.1-integration-to-master] - 20200309 #

  • Initialize github to test, build and dry run integration branch and then merge integration unto master

[0.0.1-integration] - 20200309 #

  • Initialize github to test, build and dry run integration branch

[0.0.1-github-action] - 20200308 #

  • Initialize github to test, build and dry run release/** branches

[0.0.1-beta] - 20200308 #

  • Initialize CI/CD

Use this package as a library

1. Depend on it

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

  measurement: ^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:measurement/measurement.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 Jul 10, 2020, and provided a score, details, and suggestions below. Analysis was completed with status completed using:

  • Dart: 2.8.4
  • pana: 0.13.13

Health suggestions

Fix lib/unit.dart. (-0.50 points)

Analysis of lib/unit.dart reported 1 hint:

line 34 col 22: Unnecessary new keyword.

Maintenance suggestions

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

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 measurement.dart. Packages with multiple examples should provide example/

For more information see the pub package layout conventions.

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.


Package Constraint Resolved Available
Direct dependencies
Dart SDK >=2.1.0 <3.0.0
trotter ^1.1.1 1.2.0
tuple ^1.0.3 1.0.3
Transitive dependencies
matcher 0.12.8
meta 1.2.2 1.3.0-nullsafety
path 1.7.0
quiver 2.1.3
stack_trace 1.9.5
Dev dependencies
test ^1.14.1