@@ -11,15 +11,16 @@ import 'package:flutter/services.dart';
11
11
// From the Flutter engine, i.e. from dart:ui.
12
12
//
13
13
14
- extension PaintChecks on Subject <Paint > {
15
- Subject <Shader ?> get shader => has ((x) => x.shader, 'shader' );
16
- }
17
-
18
14
extension OffsetChecks on Subject <Offset > {
19
15
Subject <double > get dx => has ((x) => x.dx, 'dx' );
20
16
Subject <double > get dy => has ((x) => x.dy, 'dy' );
21
17
}
22
18
19
+ extension SizeChecks on Subject <Size > {
20
+ Subject <double > get width => has ((x) => x.width, 'width' );
21
+ Subject <double > get height => has ((x) => x.height, 'height' );
22
+ }
23
+
23
24
extension RectChecks on Subject <Rect > {
24
25
Subject <double > get left => has ((d) => d.left, 'left' );
25
26
Subject <double > get top => has ((d) => d.top, 'top' );
@@ -30,16 +31,15 @@ extension RectChecks on Subject<Rect> {
30
31
// TODO others
31
32
}
32
33
34
+ extension PaintChecks on Subject <Paint > {
35
+ Subject <Shader ?> get shader => has ((x) => x.shader, 'shader' );
36
+ }
37
+
33
38
extension FontVariationChecks on Subject <FontVariation > {
34
39
Subject <String > get axis => has ((x) => x.axis, 'axis' );
35
40
Subject <double > get value => has ((x) => x.value, 'value' );
36
41
}
37
42
38
- extension SizeChecks on Subject <Size > {
39
- Subject <double > get width => has ((x) => x.width, 'width' );
40
- Subject <double > get height => has ((x) => x.height, 'height' );
41
- }
42
-
43
43
////////////////////////////////////////////////////////////////
44
44
// From 'package:flutter/foundation.dart'.
45
45
//
@@ -75,6 +75,10 @@ extension AnimationChecks<T> on Subject<Animation<T>> {
75
75
// From 'package:flutter/painting.dart'.
76
76
//
77
77
78
+ extension BoxDecorationChecks on Subject <BoxDecoration > {
79
+ Subject <Color ?> get color => has ((x) => x.color, 'color' );
80
+ }
81
+
78
82
extension TextStyleChecks on Subject <TextStyle > {
79
83
Subject <bool > get inherit => has ((t) => t.inherit, 'inherit' );
80
84
Subject <Color ?> get color => has ((t) => t.color, 'color' );
@@ -92,10 +96,6 @@ extension InlineSpanChecks on Subject<InlineSpan> {
92
96
Subject <TextStyle ?> get style => has ((x) => x.style, 'style' );
93
97
}
94
98
95
- extension BoxDecorationChecks on Subject <BoxDecoration > {
96
- Subject <Color ?> get color => has ((x) => x.color, 'color' );
97
- }
98
-
99
99
////////////////////////////////////////////////////////////////
100
100
// From 'package:flutter/rendering.dart'.
101
101
//
@@ -113,35 +113,24 @@ extension RenderParagraphChecks on Subject<RenderParagraph> {
113
113
// From 'package:flutter/widgets.dart'.
114
114
//
115
115
116
- extension ColoredBoxChecks on Subject <ColoredBox > {
117
- Subject <Color ?> get color => has ((d) => d.color, 'color' );
118
- }
119
-
120
116
extension GlobalKeyChecks <T extends State <StatefulWidget >> on Subject <GlobalKey <T >> {
121
117
Subject <BuildContext ?> get currentContext => has ((k) => k.currentContext, 'currentContext' );
122
118
Subject <Widget ?> get currentWidget => has ((k) => k.currentWidget, 'currentWidget' );
123
119
Subject <T ?> get currentState => has ((k) => k.currentState, 'currentState' );
124
120
}
125
121
126
- extension IconChecks on Subject <Icon > {
127
- Subject <IconData ?> get icon => has ((i) => i.icon, 'icon' );
128
- Subject <Color ?> get color => has ((i) => i.color, 'color' );
129
-
130
- // TODO others
131
- }
132
-
133
- extension RouteChecks <T > on Subject <Route <T >> {
134
- Subject <bool > get isFirst => has ((r) => r.isFirst, 'isFirst' );
135
- Subject <RouteSettings > get settings => has ((r) => r.settings, 'settings' );
122
+ extension ElementChecks on Subject <Element > {
123
+ Subject <Size ?> get size => has ((t) => t.size, 'size' );
124
+ // TODO more
136
125
}
137
126
138
- extension PageRouteChecks <T > on Subject <PageRoute <T >> {
139
- Subject <bool > get fullscreenDialog => has ((x) => x.fullscreenDialog, 'fullscreenDialog' );
127
+ extension MediaQueryDataChecks on Subject <MediaQueryData > {
128
+ Subject <TextScaler > get textScaler => has ((x) => x.textScaler, 'textScaler' );
129
+ // TODO more
140
130
}
141
131
142
- extension RouteSettingsChecks <T > on Subject <RouteSettings > {
143
- Subject <String ?> get name => has ((s) => s.name, 'name' );
144
- Subject <Object ?> get arguments => has ((s) => s.arguments, 'arguments' );
132
+ extension ColoredBoxChecks on Subject <ColoredBox > {
133
+ Subject <Color ?> get color => has ((d) => d.color, 'color' );
145
134
}
146
135
147
136
extension TextChecks on Subject <Text > {
@@ -153,14 +142,11 @@ extension TextEditingControllerChecks on Subject<TextEditingController> {
153
142
Subject <String ?> get text => has ((t) => t.text, 'text' );
154
143
}
155
144
156
- extension ElementChecks on Subject <Element > {
157
- Subject <Size ?> get size => has ((t) => t.size, 'size' );
158
- // TODO more
159
- }
145
+ extension IconChecks on Subject <Icon > {
146
+ Subject <IconData ?> get icon => has ((i) => i.icon, 'icon' );
147
+ Subject <Color ?> get color => has ((i) => i.color, 'color' );
160
148
161
- extension MediaQueryDataChecks on Subject <MediaQueryData > {
162
- Subject <TextScaler > get textScaler => has ((x) => x.textScaler, 'textScaler' );
163
- // TODO more
149
+ // TODO others
164
150
}
165
151
166
152
extension TableRowChecks on Subject <TableRow > {
@@ -171,14 +157,27 @@ extension TableChecks on Subject<Table> {
171
157
Subject <List <TableRow >> get children => has ((x) => x.children, 'children' );
172
158
}
173
159
160
+ extension RouteChecks <T > on Subject <Route <T >> {
161
+ Subject <bool > get isFirst => has ((r) => r.isFirst, 'isFirst' );
162
+ Subject <RouteSettings > get settings => has ((r) => r.settings, 'settings' );
163
+ }
164
+
165
+ extension RouteSettingsChecks <T > on Subject <RouteSettings > {
166
+ Subject <String ?> get name => has ((s) => s.name, 'name' );
167
+ Subject <Object ?> get arguments => has ((s) => s.arguments, 'arguments' );
168
+ }
169
+
170
+ extension PageRouteChecks <T > on Subject <PageRoute <T >> {
171
+ Subject <bool > get fullscreenDialog => has ((x) => x.fullscreenDialog, 'fullscreenDialog' );
172
+ }
173
+
174
174
////////////////////////////////////////////////////////////////
175
175
// From 'package:flutter/material.dart'.
176
176
//
177
177
178
- extension TextFieldChecks on Subject <TextField > {
179
- Subject <TextCapitalization ?> get textCapitalization => has ((t) => t.textCapitalization, 'textCapitalization' );
180
- Subject <InputDecoration ?> get decoration => has ((t) => t.decoration, 'decoration' );
181
- Subject <TextEditingController ?> get controller => has ((t) => t.controller, 'controller' );
178
+ extension MaterialChecks on Subject <Material > {
179
+ Subject <Color ?> get color => has ((x) => x.color, 'color' );
180
+ // TODO more
182
181
}
183
182
184
183
extension TextThemeChecks on Subject <TextTheme > {
@@ -207,27 +206,28 @@ extension TypographyChecks on Subject<Typography> {
207
206
Subject <TextTheme > get tall => has ((t) => t.tall, 'tall' );
208
207
}
209
208
210
- extension MaterialChecks on Subject <Material > {
211
- Subject <Color ?> get color => has ((x) => x.color, 'color' );
212
- // TODO more
209
+ extension ThemeDataChecks on Subject <ThemeData > {
210
+ Subject <Brightness > get brightness => has ((x) => x.brightness, 'brightness' );
213
211
}
214
212
215
213
extension InputDecorationChecks on Subject <InputDecoration > {
216
214
Subject <String ?> get hintText => has ((x) => x.hintText, 'hintText' );
217
215
}
218
216
219
- extension RadioListTileChecks <T > on Subject <RadioListTile <T >> {
220
- Subject <bool > get checked => has ((x) => x.checked, 'checked' );
217
+ extension TextFieldChecks on Subject <TextField > {
218
+ Subject <TextCapitalization ?> get textCapitalization => has ((t) => t.textCapitalization, 'textCapitalization' );
219
+ Subject <InputDecoration ?> get decoration => has ((t) => t.decoration, 'decoration' );
220
+ Subject <TextEditingController ?> get controller => has ((t) => t.controller, 'controller' );
221
221
}
222
222
223
- extension SwitchListTileChecks < T > on Subject <SwitchListTile > {
224
- Subject <bool > get value => has ((x) => x.value , 'value ' );
223
+ extension IconButtonChecks on Subject <IconButton > {
224
+ Subject <bool ? > get isSelected => has ((x) => x.isSelected , 'isSelected ' );
225
225
}
226
226
227
- extension ThemeDataChecks on Subject <ThemeData > {
228
- Subject <Brightness > get brightness => has ((x) => x.brightness , 'brightness ' );
227
+ extension SwitchListTileChecks < T > on Subject <SwitchListTile > {
228
+ Subject <bool > get value => has ((x) => x.value , 'value ' );
229
229
}
230
230
231
- extension IconButtonChecks on Subject <IconButton > {
232
- Subject <bool ? > get isSelected => has ((x) => x.isSelected , 'isSelected ' );
231
+ extension RadioListTileChecks < T > on Subject <RadioListTile < T > > {
232
+ Subject <bool > get checked => has ((x) => x.checked , 'checked ' );
233
233
}
0 commit comments