country_io 1.0.0
country_io: ^1.0.0 copied to clipboard
A simple country.io data fetcher-cum-parser, which stores processed data in a target file( if provided ) and returns it, written in Dart :)
0
likes
85
/ 110
pub points
23
%
popularity
We analyzed this package on Jan 12, 2021, and awarded it 85 pub points (of a possible 110):
10/10 points: Provide a valid pubspec.yaml
0/5 points: Provide a valid README.md
Links in `README.md` should be secure. 3 links are insecure.
README.md:5:70
╷
5 │ <p>This <em>Dart</em> package can be used to fetch country data from <a href="http://country.io/">country.io</a>, which includes <em>country iso2 code</em>, <em>country name</em>, <em>capital name</em>, <em>continent code</em>, <em>currency code</em> & <em>phone code</em>, which will be eventually stored in a json encoded file, whose path needs to be provided to <code>Generator</code> class constructor.</p>
│ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
╵
Use https
URLs instead.
5/5 points: Provide a valid CHANGELOG.md
10/10 points: Package has an example
- Found example at:
example/example.dart
10/10 points: 20% or more of the public API has dartdoc comments
- 17 out of 56 API elements (30.4 %) 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:country_io/country_io.dart
that imports:package:country_io/generator/generator.dart
that imports:package:country_io/src/currency.dart
that imports:dart:io
20/30 points: code has no errors, warnings, lints, or formatting issues
Found 9 issues. Showing the first 2:
INFO: DO use curly braces for all flow control structures.
lib/generator/generator.dart:102:31
╷
102 │ ┌ try {
103 │ │ File.fromUri(Uri.parse(targetPath)).openWrite(
104 │ │ mode: FileMode.write)
105 │ │ ..writeln(
106 │ │ json.encode(
107 │ │ tmp,
108 │ │ ),
109 │ │ )
110 │ │ ..close().then(
111 │ │ (val) => completer.complete(tmp),
112 │ │ onError: (e) => completer.complete(
113 │ │ {})); // if file path is given for writing data into it, and operation is unsuccessful, a blank map will be returned
114 │ │ } on Exception {
115 │ │ completer.complete(
116 │ │ {}); // in case of exception, will return a blank map
117 │ └ }
╵
To reproduce make sure you are using pedantic and run dartanalyzer lib/generator/generator.dart
INFO: DO use curly braces for all flow control structures.
lib/generator/generator.dart:119:31
╷
119 │ completer.complete(tmp);
│ ^^^^^^^^^^^^^^^^^^^^^^^^
╵
To reproduce make sure you are using pedantic and run dartanalyzer lib/generator/generator.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
.