format_bytes 1.0.1
format_bytes: ^1.0.1 copied to clipboard
Format byte amounts in human readable form. Includes support for localization and custom formatting options.
0
likes
90
/ 110
pub points
42
%
popularity
We analyzed this package on Feb 27, 2021, and awarded it 90 pub points (of a possible 110):
10/10 points: Provide a valid pubspec.yaml
5/5 points: Provide a valid README.md
5/5 points: Provide a valid CHANGELOG.md
10/10 points: Package has an example
- Found example at:
example/main.dart
10/10 points: 20% or more of the public API has dartdoc comments
- 10 out of 35 API elements (28.6 %) have documentation comments.
20/20 points: Supports 2 of 2 possible platforms (native, js)
20/30 points: code has no errors, warnings, lints, or formatting issues
Found 29 issues. Showing the first 2:
INFO: Avoid const keyword.
lib/src/localizations.dart:11:25
╷
11 │ const _localizedUnits = const {
│ ┌─────────────────────────^
12 │ │ 'en': const Localization('%amount%sep%unit', ' ', const {
13 │ │ Unit.byte: 'B',
14 │ │ Unit.kilobyte: 'KB',
15 │ │ Unit.megabyte: 'MB',
16 │ │ Unit.gigabyte: 'GB',
17 │ │ Unit.terabyte: 'TB',
18 │ │ Unit.petabyte: 'PB',
19 │ │ Unit.exabyte: 'EB',
20 │ │ Unit.zettabyte: 'ZB',
21 │ │ Unit.yottabyte: 'YB',
22 │ │ Unit.kibibyte: 'KiB',
23 │ │ Unit.mebibyte: 'MiB',
24 │ │ Unit.gibibyte: 'GiB',
25 │ │ Unit.tebibyte: 'TiB',
26 │ │ Unit.pebibyte: 'PiB',
27 │ │ Unit.exbibyte: 'EiB',
28 │ │ Unit.zebibyte: 'ZiB',
29 │ │ Unit.yobibyte: 'YiB'
30 │ │ }),
31 │ │ 'fi': const Localization('%amount%sep%unit', ' ', const {
32 │ │ Unit.byte: 't',
33 │ │ Unit.kilobyte: 'Kt',
34 │ │ Unit.megabyte: 'Mt',
35 │ │ Unit.gigabyte: 'Gt',
36 │ │ Unit.terabyte: 'Tt',
37 │ │ Unit.petabyte: 'Pt',
38 │ │ Unit.exabyte: 'Et',
39 │ │ Unit.zettabyte: 'Zt',
40 │ │ Unit.yottabyte: 'Yt',
41 │ │ Unit.kibibyte: 'KiB',
42 │ │ Unit.mebibyte: 'MiB',
43 │ │ Unit.gibibyte: 'GiB',
44 │ │ Unit.tebibyte: 'TiB',
45 │ │ Unit.pebibyte: 'PiB',
46 │ │ Unit.exbibyte: 'EiB',
47 │ │ Unit.zebibyte: 'ZiB',
48 │ │ Unit.yobibyte: 'YiB'
49 │ │ }),
50 │ │ 'ru': const Localization('%amount%sep%unit', ' ', const {
51 │ │ Unit.byte: 'б',
52 │ │ Unit.kilobyte: 'Кб',
53 │ │ Unit.megabyte: 'Мб',
54 │ │ Unit.gigabyte: 'Гб',
55 │ │ Unit.terabyte: 'Тб',
56 │ │ Unit.petabyte: 'Пб',
57 │ │ Unit.exabyte: 'Эб',
58 │ │ Unit.zettabyte: 'Зб',
59 │ │ Unit.yottabyte: 'Йб',
60 │ │ Unit.kibibyte: 'КиБ',
61 │ │ Unit.mebibyte: 'МиБ',
62 │ │ Unit.gibibyte: 'ГиБ',
63 │ │ Unit.tebibyte: 'ТиБ',
64 │ │ Unit.pebibyte: 'ПиБ',
65 │ │ Unit.exbibyte: 'ЭиБ',
66 │ │ Unit.zebibyte: 'ЗиБ',
67 │ │ Unit.yobibyte: 'ЙиБ'
68 │ │ }),
69 │ │ };
│ └─^
╵
To reproduce make sure you are using pedantic and run dartanalyzer lib/src/localizations.dart
INFO: Avoid const keyword.
lib/src/localizations.dart:12:9
╷
12 │ 'en': const Localization('%amount%sep%unit', ' ', const {
│ ┌─────────^
13 │ │ Unit.byte: 'B',
14 │ │ Unit.kilobyte: 'KB',
15 │ │ Unit.megabyte: 'MB',
16 │ │ Unit.gigabyte: 'GB',
17 │ │ Unit.terabyte: 'TB',
18 │ │ Unit.petabyte: 'PB',
19 │ │ Unit.exabyte: 'EB',
20 │ │ Unit.zettabyte: 'ZB',
21 │ │ Unit.yottabyte: 'YB',
22 │ │ Unit.kibibyte: 'KiB',
23 │ │ Unit.mebibyte: 'MiB',
24 │ │ Unit.gibibyte: 'GiB',
25 │ │ Unit.tebibyte: 'TiB',
26 │ │ Unit.pebibyte: 'PiB',
27 │ │ Unit.exbibyte: 'EiB',
28 │ │ Unit.zebibyte: 'ZiB',
29 │ │ Unit.yobibyte: 'YiB'
30 │ │ }),
│ └────^
╵
To reproduce make sure you are using pedantic and run dartanalyzer lib/src/localizations.dart
0/10 points: All of the package dependencies are supported in the latest version
Package | Constraint | Compatible | Latest |
---|---|---|---|
intl | ^0.15.7 | 0.15.8 | 0.17.0 |
Transitive dependencies
Package | Constraint | Compatible | Latest |
---|---|---|---|
path | - | 1.7.0 | 1.8.0 |
To reproduce run pub outdated --no-dev-dependencies --up-to-date --no-dependency-overrides
.
The constraint `^0.15.7` on intl does not support the latest published version `0.17.0`
pubspec.yaml:13:9
╷
13 │ intl: ^0.15.7
│ ^^^^^^^
╵
10/10 points: Package supports latest stable Dart and Flutter SDKs
Analysed with
Pana 0.14.10
,
Dart 2.10.5
.