Skip to content

Commit 5a7c289

Browse files
authored
Merge pull request #80 from MrSquaare/fix/lint-as-dev-dependency
move `lint` as dev dependency
2 parents 19b1582 + c8fa69b commit 5a7c289

12 files changed

+311
-255
lines changed

analysis_options.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
include: package:lint/analysis_options.yaml
1+
include: package:lint/strict.yaml
22

33
linter:
44
rules:

example/pubspec.lock

Lines changed: 63 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -5,51 +5,50 @@ packages:
55
dependency: transitive
66
description:
77
name: async
8-
url: "https://pub.dartlang.org"
8+
sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0
9+
url: "https://pub.dev"
910
source: hosted
10-
version: "2.8.2"
11+
version: "2.10.0"
1112
boolean_selector:
1213
dependency: transitive
1314
description:
1415
name: boolean_selector
15-
url: "https://pub.dartlang.org"
16+
sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66"
17+
url: "https://pub.dev"
1618
source: hosted
17-
version: "2.1.0"
19+
version: "2.1.1"
1820
characters:
1921
dependency: transitive
2022
description:
2123
name: characters
22-
url: "https://pub.dartlang.org"
23-
source: hosted
24-
version: "1.2.0"
25-
charcode:
26-
dependency: transitive
27-
description:
28-
name: charcode
29-
url: "https://pub.dartlang.org"
24+
sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c
25+
url: "https://pub.dev"
3026
source: hosted
31-
version: "1.3.1"
27+
version: "1.2.1"
3228
clock:
3329
dependency: transitive
3430
description:
3531
name: clock
36-
url: "https://pub.dartlang.org"
32+
sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf
33+
url: "https://pub.dev"
3734
source: hosted
38-
version: "1.1.0"
35+
version: "1.1.1"
3936
collection:
4037
dependency: transitive
4138
description:
4239
name: collection
43-
url: "https://pub.dartlang.org"
40+
sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0
41+
url: "https://pub.dev"
4442
source: hosted
45-
version: "1.15.0"
43+
version: "1.17.0"
4644
fake_async:
4745
dependency: transitive
4846
description:
4947
name: fake_async
50-
url: "https://pub.dartlang.org"
48+
sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78"
49+
url: "https://pub.dev"
5150
source: hosted
52-
version: "1.2.0"
51+
version: "1.3.1"
5352
flutter:
5453
dependency: "direct main"
5554
description: flutter
@@ -60,34 +59,46 @@ packages:
6059
description: flutter
6160
source: sdk
6261
version: "0.0.0"
63-
lint:
62+
js:
6463
dependency: transitive
6564
description:
66-
name: lint
67-
url: "https://pub.dartlang.org"
65+
name: js
66+
sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7"
67+
url: "https://pub.dev"
6868
source: hosted
69-
version: "1.5.3"
69+
version: "0.6.5"
7070
matcher:
7171
dependency: transitive
7272
description:
7373
name: matcher
74-
url: "https://pub.dartlang.org"
74+
sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72"
75+
url: "https://pub.dev"
76+
source: hosted
77+
version: "0.12.13"
78+
material_color_utilities:
79+
dependency: transitive
80+
description:
81+
name: material_color_utilities
82+
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
83+
url: "https://pub.dev"
7584
source: hosted
76-
version: "0.12.11"
85+
version: "0.2.0"
7786
meta:
7887
dependency: transitive
7988
description:
8089
name: meta
81-
url: "https://pub.dartlang.org"
90+
sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42"
91+
url: "https://pub.dev"
8292
source: hosted
83-
version: "1.7.0"
93+
version: "1.8.0"
8494
path:
8595
dependency: transitive
8696
description:
8797
name: path
88-
url: "https://pub.dartlang.org"
98+
sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b
99+
url: "https://pub.dev"
89100
source: hosted
90-
version: "1.8.0"
101+
version: "1.8.2"
91102
sky_engine:
92103
dependency: transitive
93104
description: flutter
@@ -97,64 +108,64 @@ packages:
97108
dependency: transitive
98109
description:
99110
name: source_span
100-
url: "https://pub.dartlang.org"
111+
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
112+
url: "https://pub.dev"
101113
source: hosted
102-
version: "1.8.1"
114+
version: "1.9.1"
103115
stack_trace:
104116
dependency: transitive
105117
description:
106118
name: stack_trace
107-
url: "https://pub.dartlang.org"
119+
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
120+
url: "https://pub.dev"
108121
source: hosted
109-
version: "1.10.0"
122+
version: "1.11.0"
110123
stream_channel:
111124
dependency: transitive
112125
description:
113126
name: stream_channel
114-
url: "https://pub.dartlang.org"
127+
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
128+
url: "https://pub.dev"
115129
source: hosted
116-
version: "2.1.0"
130+
version: "2.1.1"
117131
string_scanner:
118132
dependency: transitive
119133
description:
120134
name: string_scanner
121-
url: "https://pub.dartlang.org"
135+
sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde"
136+
url: "https://pub.dev"
122137
source: hosted
123-
version: "1.1.0"
138+
version: "1.2.0"
124139
styled_widget:
125140
dependency: "direct main"
126141
description:
127142
path: ".."
128143
relative: true
129144
source: path
130-
version: "0.4.0+3"
145+
version: "0.4.1"
131146
term_glyph:
132147
dependency: transitive
133148
description:
134149
name: term_glyph
135-
url: "https://pub.dartlang.org"
150+
sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84
151+
url: "https://pub.dev"
136152
source: hosted
137-
version: "1.2.0"
153+
version: "1.2.1"
138154
test_api:
139155
dependency: transitive
140156
description:
141157
name: test_api
142-
url: "https://pub.dartlang.org"
158+
sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206
159+
url: "https://pub.dev"
143160
source: hosted
144-
version: "0.4.3"
145-
typed_data:
146-
dependency: transitive
147-
description:
148-
name: typed_data
149-
url: "https://pub.dartlang.org"
150-
source: hosted
151-
version: "1.3.0"
161+
version: "0.4.16"
152162
vector_math:
153163
dependency: transitive
154164
description:
155165
name: vector_math
156-
url: "https://pub.dartlang.org"
166+
sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803"
167+
url: "https://pub.dev"
157168
source: hosted
158-
version: "2.1.1"
169+
version: "2.1.4"
159170
sdks:
160-
dart: ">=2.14.0 <3.0.0"
171+
dart: ">=2.18.0 <3.0.0"

lib/src/animated_icon.dart

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,18 @@ part of '../styled_widget.dart';
22

33
// TODO: why extend icon
44
class _StyledAnimatedIconContainer extends Icon {
5+
@override
56
final IconData? icon;
7+
@override
68
final double? size;
9+
@override
710
final Color? color;
11+
@override
812
final String? semanticLabel;
13+
@override
914
final TextDirection? textDirection;
1015

11-
_StyledAnimatedIconContainer(
16+
const _StyledAnimatedIconContainer(
1217
this.icon, {
1318
this.color,
1419
this.semanticLabel,
@@ -24,7 +29,7 @@ class _StyledAnimatedIconContainer extends Icon {
2429

2530
@override
2631
Widget build(BuildContext context) {
27-
_StyledAnimatedModel? animation =
32+
final _StyledAnimatedModel? animation =
2833
_StyledInheritedAnimation.of(context)?.animation;
2934
if (animation == null) {
3035
return super.build(context);
@@ -47,7 +52,7 @@ class _AnimatedIcon extends ImplicitlyAnimatedWidget {
4752
/// Creates a container that animates its parameters implicitly.
4853
///
4954
/// The [curve] and [duration] arguments must not be null.
50-
_AnimatedIcon(
55+
const _AnimatedIcon(
5156
this.icon, {
5257
Key? key,
5358
this.color,
@@ -70,12 +75,6 @@ class _AnimatedIcon extends ImplicitlyAnimatedWidget {
7075

7176
@override
7277
_AnimatedIconState createState() => _AnimatedIconState();
73-
74-
@override
75-
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
76-
super.debugFillProperties(properties);
77-
// TODO: debug
78-
}
7978
}
8079

8180
class _AnimatedIconState extends AnimatedWidgetBaseState<_AnimatedIcon> {

lib/src/animated_text.dart

Lines changed: 41 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,32 @@ part of '../styled_widget.dart';
22

33
// TODO: why extend text
44
class _StyledAnimatedTextContainer extends Text {
5+
@override
56
final String data;
7+
@override
68
final TextStyle? style;
9+
@override
710
final StrutStyle? strutStyle;
11+
@override
812
final TextAlign? textAlign;
13+
@override
914
final TextDirection? textDirection;
15+
@override
1016
final Locale? locale;
17+
@override
1118
final bool? softWrap;
19+
@override
1220
final TextOverflow? overflow;
21+
@override
1322
final double? textScaleFactor;
23+
@override
1424
final int? maxLines;
25+
@override
1526
final String? semanticsLabel;
27+
@override
1628
final TextWidthBasis? textWidthBasis;
1729

18-
_StyledAnimatedTextContainer(
30+
const _StyledAnimatedTextContainer(
1931
this.data, {
2032
this.locale,
2133
this.maxLines,
@@ -45,7 +57,8 @@ class _StyledAnimatedTextContainer extends Text {
4557

4658
@override
4759
Widget build(BuildContext context) {
48-
_StyledAnimatedModel? animation = _StyledInheritedAnimation.of(context)?.animation;
60+
final _StyledAnimatedModel? animation =
61+
_StyledInheritedAnimation.of(context)?.animation;
4962
if (animation == null) {
5063
return super.build(context);
5164
}
@@ -74,7 +87,7 @@ class _AnimatedText extends ImplicitlyAnimatedWidget {
7487
/// Creates a container that animates its parameters implicitly.
7588
///
7689
/// The [curve] and [duration] arguments must not be null.
77-
_AnimatedText(
90+
const _AnimatedText(
7891
this.data, {
7992
Key? key,
8093
this.locale,
@@ -108,12 +121,6 @@ class _AnimatedText extends ImplicitlyAnimatedWidget {
108121

109122
@override
110123
_AnimatedTextState createState() => _AnimatedTextState();
111-
112-
@override
113-
void debugFillProperties(DiagnosticPropertiesBuilder properties) {
114-
super.debugFillProperties(properties);
115-
// TODO: denug variables
116-
}
117124
}
118125

119126
class _AnimatedTextState extends AnimatedWidgetBaseState<_AnimatedText> {
@@ -130,19 +137,31 @@ class _AnimatedTextState extends AnimatedWidgetBaseState<_AnimatedText> {
130137

131138
@override
132139
void forEachTween(TweenVisitor<dynamic> visitor) {
133-
_textScaleFactor =
134-
visitor(_textScaleFactor, widget.textScaleFactor, (dynamic value) => Tween<double>(begin: value as double))
135-
as Tween<double>?;
136-
_fontSize = visitor(_fontSize, widget.style?.fontSize, (dynamic value) => Tween<double>(begin: value as double))
137-
as Tween<double>?;
138-
_letterSpacing =
139-
visitor(_letterSpacing, widget.style?.letterSpacing, (dynamic value) => Tween<double>(begin: value as double))
140-
as Tween<double>?;
141-
_wordSpacing =
142-
visitor(_wordSpacing, widget.style?.wordSpacing, (dynamic value) => Tween<double>(begin: value as double))
143-
as Tween<double>?;
144-
_height = visitor(_height, widget.style?.height, (dynamic value) => Tween<double>(begin: value as double))
145-
as Tween<double>?;
140+
_textScaleFactor = visitor(
141+
_textScaleFactor,
142+
widget.textScaleFactor,
143+
(dynamic value) => Tween<double>(begin: value as double),
144+
) as Tween<double>?;
145+
_fontSize = visitor(
146+
_fontSize,
147+
widget.style?.fontSize,
148+
(dynamic value) => Tween<double>(begin: value as double),
149+
) as Tween<double>?;
150+
_letterSpacing = visitor(
151+
_letterSpacing,
152+
widget.style?.letterSpacing,
153+
(dynamic value) => Tween<double>(begin: value as double),
154+
) as Tween<double>?;
155+
_wordSpacing = visitor(
156+
_wordSpacing,
157+
widget.style?.wordSpacing,
158+
(dynamic value) => Tween<double>(begin: value as double),
159+
) as Tween<double>?;
160+
_height = visitor(
161+
_height,
162+
widget.style?.height,
163+
(dynamic value) => Tween<double>(begin: value as double),
164+
) as Tween<double>?;
146165
_decorationThickness = visitor(
147166
_decorationThickness,
148167
widget.style?.decorationThickness,

0 commit comments

Comments
 (0)