platform 2.2.1

Dart native
Flutter Android iOS

A pluggable, mockable platform abstraction for Dart.

6
likes
70 / 110
pub points
100 %
popularity

We analyzed this package on Oct 23, 2020, and awarded it 70 pub points (of a possible 110):

Follow Dart file conventions
10 / 20

0/10 points: Provide a valid pubspec.yaml

The package description is too short.

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.

5/5 points: Provide a valid README.md

5/5 points: Provide a valid CHANGELOG.md

Provide documentation
10 / 20

0/10 points: Package has an example

No example found.

See package layout guidelines on how to add an example.

10/10 points: 20% or more of the public API has dartdoc comments

  • 63 out of 80 API elements (78.8 %) have documentation comments.
Support multiple platforms
10 / 20

10/20 points: Supports 1 of 2 possible platforms (native, js)

Consider supporting multiple platforms:

Package not compatible with runtime js

Because:

  • package:platform/platform.dart that imports:
  • package:platform/src/interface/local_platform.dart that imports:
  • dart:io
Pass static analysis
20 / 30

20/30 points: code has no errors, warnings, lints, or formatting issues

Found 5 issues. Showing the first 2:

INFO: 'packageRoot' is deprecated and shouldn't be used. packages/ directory resolution is not supported in Dart 2.

lib/src/interface/local_platform.dart:45:41

   ╷
45 │   String get packageRoot => io.Platform.packageRoot;
   │                                         ^^^^^^^^^^^
   ╵

To reproduce make sure you are using pedantic and run dartanalyzer lib/src/interface/local_platform.dart

INFO: Unnecessary new keyword.

lib/src/testing/fake_platform.dart:42:23

   ╷
42 │         environment = new Map<String, String>.from(platform.environment),
   │                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
   ╵

To reproduce make sure you are using pedantic and run dartanalyzer lib/src/testing/fake_platform.dart

Support up-to-date dependencies
20 / 20

10/10 points: All of the package dependencies are supported in the latest version

No dependencies.

To reproduce run pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides.

10/10 points: Package supports latest stable Dart and Flutter SDKs