platform 2.2.1
platform: ^2.2.1 copied to clipboard
A pluggable, mockable platform abstraction for Dart.
We analyzed this package on Jan 22, 2021, and awarded it 70 pub points (of a possible 110):
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
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.
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
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
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
.