Skip to content

Commit 198633c

Browse files
authored
refactor: stricter lint rules
Closes #98
1 parent dc827e0 commit 198633c

File tree

6 files changed

+37
-15
lines changed

6 files changed

+37
-15
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
77

88
## [Unreleased]
99

10+
### Changed
11+
12+
- bump up eo_color dependency to 1.1.9.
13+
- fix types and add minor improvements to README.
14+
- stricter lint rules —
15+
[98](https://github.com/dartoos-dev/flutter_brand_palettes/issues/98).
16+
1017
## [0.3.9] - 2021-07-24
1118

1219
## [0.3.8] - 2021-06-29

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ Rultor.com](https://www.rultor.com/b/dartoos-dev/flutter_brand_palettes)](https:
3636
**Flutter Brand Palettes** is a collection of declarative, object-oriented
3737
classes for the color palettes of popular brands and companies.
3838

39-
For example, to retrieve Instagram's colors at once, as a `List<Color>` object,
40-
simply declare `InstagramGrad().colors` — the 'Grad' suffix is short for
39+
For example, to retrieve the Instagram colors at once, as a `List<Color>`
40+
object, simply declare `InstagramGrad().colors` — the 'Grad' suffix is short for
4141
_Gradient_.
4242

43-
For a single color, simply select it from the brand-related color palette class.
43+
For a single color, simply select it from the color palette class it belongs to.
4444
For example, the command `Instagram.royalBlue()` retrieves the royal blue color
4545
from the Instagram color palette; `Instagram.yellow()` retrieves the yellow
4646
color; and so on.

analysis_options.yaml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,24 @@
11
include: package:lint/analysis_options_package.yaml
2+
analyzer:
3+
strong-mode:
4+
# A value of false ensures that the type inference engine never implicitly casts
5+
# from dynamic to a more specific type.
6+
implicit-casts: false
7+
# A value of false ensures that the type inference engine never chooses the
8+
# dynamic type when it can’t determine a static type.
9+
implicit-dynamic: false
210
linter:
311
rules:
4-
# Always await.
5-
unawaited_futures: true
612
# Make constructors the first thing in every class
713
sort_constructors_first: true
814
# Good packages document everything
915
public_member_api_docs: true
16+
# Always await.
17+
unawaited_futures: true
18+
# It's a good practice to expose the ability to provide a key when creating public widgets.
19+
use_key_in_widget_constructors: true
20+
always_declare_return_types: true
21+
cancel_subscriptions: true
22+
close_sinks: true
23+
only_throw_errors: true
24+
package_api_docs: true

example/pubspec.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ packages:
2828
name: charcode
2929
url: "https://pub.dartlang.org"
3030
source: hosted
31-
version: "1.2.0"
31+
version: "1.3.1"
3232
clock:
3333
dependency: transitive
3434
description:
@@ -49,7 +49,7 @@ packages:
4949
name: eo_color
5050
url: "https://pub.dartlang.org"
5151
source: hosted
52-
version: "1.1.5"
52+
version: "1.1.9"
5353
fake_async:
5454
dependency: transitive
5555
description:
@@ -68,7 +68,7 @@ packages:
6868
path: ".."
6969
relative: true
7070
source: path
71-
version: "0.3.8"
71+
version: "0.3.9"
7272
flutter_test:
7373
dependency: "direct dev"
7474
description: flutter
@@ -94,7 +94,7 @@ packages:
9494
name: meta
9595
url: "https://pub.dartlang.org"
9696
source: hosted
97-
version: "1.4.0"
97+
version: "1.7.0"
9898
path:
9999
dependency: transitive
100100
description:
@@ -148,7 +148,7 @@ packages:
148148
name: test_api
149149
url: "https://pub.dartlang.org"
150150
source: hosted
151-
version: "0.4.0"
151+
version: "0.4.1"
152152
typed_data:
153153
dependency: transitive
154154
description:

pubspec.lock

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ packages:
2828
name: charcode
2929
url: "https://pub.dartlang.org"
3030
source: hosted
31-
version: "1.2.0"
31+
version: "1.3.1"
3232
clock:
3333
dependency: transitive
3434
description:
@@ -49,7 +49,7 @@ packages:
4949
name: eo_color
5050
url: "https://pub.dartlang.org"
5151
source: hosted
52-
version: "1.1.5"
52+
version: "1.1.9"
5353
fake_async:
5454
dependency: transitive
5555
description:
@@ -87,7 +87,7 @@ packages:
8787
name: meta
8888
url: "https://pub.dartlang.org"
8989
source: hosted
90-
version: "1.4.0"
90+
version: "1.7.0"
9191
path:
9292
dependency: transitive
9393
description:
@@ -141,7 +141,7 @@ packages:
141141
name: test_api
142142
url: "https://pub.dartlang.org"
143143
source: hosted
144-
version: "0.4.0"
144+
version: "0.4.1"
145145
typed_data:
146146
dependency: transitive
147147
description:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ environment:
99
flutter: ">=1.17.0"
1010

1111
dependencies:
12-
eo_color: ^1.1.5
12+
eo_color: ^1.1.9
1313
flutter:
1414
sdk: flutter
1515

0 commit comments

Comments
 (0)