Skip to content

Commit f3834c8

Browse files
authored
Merge pull request #68 from deepikahr/animation_test
Adding required fields to all widgets, which are missing in some components
2 parents 5c70143 + 1d3b5d1 commit f3834c8

30 files changed

+1208
-120
lines changed

example/pubspec.lock

Lines changed: 19 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,6 @@ packages:
9393
relative: true
9494
source: path
9595
version: "1.2.3"
96-
js:
97-
dependency: transitive
98-
description:
99-
name: js
100-
url: "https://pub.dartlang.org"
101-
source: hosted
102-
version: "0.6.3-nullsafety.1"
10396
matcher:
10497
dependency: transitive
10598
description:
@@ -113,7 +106,7 @@ packages:
113106
name: meta
114107
url: "https://pub.dartlang.org"
115108
source: hosted
116-
version: "1.3.0-nullsafety.4"
109+
version: "1.3.0-nullsafety.3"
117110
path:
118111
dependency: transitive
119112
description:
@@ -141,28 +134,14 @@ packages:
141134
name: petitparser
142135
url: "https://pub.dartlang.org"
143136
source: hosted
144-
version: "3.0.4"
145-
platform_detect:
146-
dependency: transitive
147-
description:
148-
name: platform_detect
149-
url: "https://pub.dartlang.org"
150-
source: hosted
151-
version: "1.4.0"
137+
version: "3.1.0"
152138
plugin_platform_interface:
153139
dependency: transitive
154140
description:
155141
name: plugin_platform_interface
156142
url: "https://pub.dartlang.org"
157143
source: hosted
158-
version: "1.0.1"
159-
pub_semver:
160-
dependency: transitive
161-
description:
162-
name: pub_semver
163-
url: "https://pub.dartlang.org"
164-
source: hosted
165-
version: "1.4.4"
144+
version: "1.0.3"
166145
sky_engine:
167146
dependency: transitive
168147
description: flutter
@@ -181,7 +160,7 @@ packages:
181160
name: stack_trace
182161
url: "https://pub.dartlang.org"
183162
source: hosted
184-
version: "1.10.0-nullsafety.2"
163+
version: "1.10.0-nullsafety.1"
185164
stream_channel:
186165
dependency: transitive
187166
description:
@@ -223,35 +202,42 @@ packages:
223202
name: url_launcher
224203
url: "https://pub.dartlang.org"
225204
source: hosted
226-
version: "5.5.3"
205+
version: "5.7.10"
227206
url_launcher_linux:
228207
dependency: transitive
229208
description:
230209
name: url_launcher_linux
231210
url: "https://pub.dartlang.org"
232211
source: hosted
233-
version: "0.0.1+1"
212+
version: "0.0.1+4"
234213
url_launcher_macos:
235214
dependency: transitive
236215
description:
237216
name: url_launcher_macos
238217
url: "https://pub.dartlang.org"
239218
source: hosted
240-
version: "0.0.1+7"
219+
version: "0.0.1+9"
241220
url_launcher_platform_interface:
242221
dependency: transitive
243222
description:
244223
name: url_launcher_platform_interface
245224
url: "https://pub.dartlang.org"
246225
source: hosted
247-
version: "1.0.8"
226+
version: "1.0.9"
248227
url_launcher_web:
249228
dependency: transitive
250229
description:
251230
name: url_launcher_web
252231
url: "https://pub.dartlang.org"
253232
source: hosted
254-
version: "0.1.3+2"
233+
version: "0.1.5+3"
234+
url_launcher_windows:
235+
dependency: transitive
236+
description:
237+
name: url_launcher_windows
238+
url: "https://pub.dartlang.org"
239+
source: hosted
240+
version: "0.0.1+3"
255241
vector_math:
256242
dependency: transitive
257243
description:
@@ -265,7 +251,7 @@ packages:
265251
name: xml
266252
url: "https://pub.dartlang.org"
267253
source: hosted
268-
version: "4.2.0"
254+
version: "4.5.1"
269255
sdks:
270-
dart: ">=2.10.0-110 <=2.11.0-213.1.beta"
271-
flutter: ">=1.18.0-6.0.pre <2.0.0"
256+
dart: ">=2.10.0-110 <2.11.0"
257+
flutter: ">=1.22.0 <2.0.0"

lib/components/accordian/gf_accordian.dart

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,19 @@ class GFAccordion extends StatefulWidget {
55
/// An accordion is used to show (and hide) content. Use [showAccordion] to hide & show the accordion content.
66
const GFAccordion(
77
{Key key,
8-
this.titleChild,
9-
this.content,
8+
this.title,
9+
this.content,
10+
this.titleChild,
11+
this.contentChild,
1012
this.collapsedTitleBackgroundColor = GFColors.WHITE,
1113
this.expandedTitleBackgroundColor = const Color(0xFFE0E0E0),
1214
this.collapsedIcon = const Icon(Icons.keyboard_arrow_down),
1315
this.expandedIcon = const Icon(Icons.keyboard_arrow_up),
14-
this.title,
16+
1517
this.textStyle = const TextStyle(color: Colors.black, fontSize: 16),
1618
this.titlePadding = const EdgeInsets.all(10),
1719
this.contentBackgroundColor,
1820
this.contentPadding = const EdgeInsets.all(10),
19-
this.contentChild,
2021
this.titleBorder = const Border(),
2122
this.contentBorder = const Border(),
2223
this.margin,

lib/components/alert/gf_alert.dart

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@ class GFAlert extends StatefulWidget {
66
/// Alert has to be wrap inside the body like [GFFloatingWidget]. See [GFFloatingWidget]
77
const GFAlert(
88
{Key key,
9+
this.content,
10+
this.title,
911
this.child,
1012
this.backgroundColor,
11-
this.content,
1213
this.width,
1314
this.type = GFAlertType.basic,
1415
this.alignment,
1516
this.contentChild,
16-
this.title,
1717
this.bottombar,
1818
this.contentTextStyle = const TextStyle(color: Colors.black87),
1919
this.titleTextStyle = const TextStyle(

lib/components/animation/gf_animation.dart

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ class GFAnimation extends StatefulWidget {
55
/// Wrap any widget with [GFAnimation] to animate your widget. see [GFAnimationType] for types of animations.
66
const GFAnimation({
77
Key key,
8+
@required this.child,
89
this.duration,
910
this.alignment,
10-
this.child,
1111
this.curve,
1212
this.type,
1313
this.width,
@@ -33,7 +33,8 @@ class GFAnimation extends StatefulWidget {
3333
this.changedWidth,
3434
this.changedHeight,
3535
this.reverseDuration,
36-
}) : super(key: key);
36+
}) : assert(child != null),
37+
super(key: key);
3738

3839
/// The duration for animation to perform
3940
final Duration duration;
@@ -167,11 +168,11 @@ class _GFAnimationState extends State<GFAnimation>
167168
super.initState();
168169
}
169170

170-
@override
171-
void dispose() {
172-
controller.dispose();
173-
super.dispose();
174-
}
171+
// @override
172+
// void dispose() {
173+
// controller.dispose();
174+
// super.dispose();
175+
// }
175176

176177
@override
177178
Widget build(BuildContext context) => getAnimatedTypeWidget();

lib/components/badge/gf_icon_badge.dart

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,9 @@ class GFIconBadge extends StatefulWidget {
88
this.padding = const EdgeInsets.symmetric(horizontal: 8),
99
@required this.child,
1010
@required this.counterChild,
11-
}) : assert(padding != null),
11+
}) : assert(child != null),
12+
assert(counterChild != null),
13+
assert(padding != null),
1214
super(key: key);
1315

1416
/// child of type [Widget] is used to show icon.

lib/components/button/gf_button_bar.dart

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,10 @@ class GFButtonBar extends StatelessWidget {
1515
this.crossAxisAlignment = WrapCrossAlignment.start,
1616
this.textDirection,
1717
this.verticalDirection = VerticalDirection.down,
18-
this.children = const <Widget>[],
18+
@required this.children,
1919
this.padding = const EdgeInsets.all(0),
20-
}) : super(key: key);
20+
}) : assert(children != null),
21+
super(key: key);
2122

2223
/// The empty space that surrounds the buttonBar. Default's to padding.zero
2324
final EdgeInsetsGeometry padding;

lib/components/checkbox/gf_checkbox.dart

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ class GFCheckbox extends StatefulWidget {
1111
this.inactiveBgColor = GFColors.WHITE,
1212
this.activeBorderColor = GFColors.WHITE,
1313
this.inactiveBorderColor = GFColors.DARK,
14-
this.onChanged,
15-
this.value,
14+
@required this.onChanged,
15+
@required this.value,
1616
this.activeIcon = const Icon(
1717
Icons.check,
1818
size: 20,
@@ -22,7 +22,9 @@ class GFCheckbox extends StatefulWidget {
2222
this.customBgColor = GFColors.SUCCESS,
2323
this.autofocus = false,
2424
this.focusNode})
25-
: assert(autofocus != null),
25+
: assert(value != null),
26+
assert(onChanged != null),
27+
assert(autofocus != null),
2628
super(key: key);
2729

2830
/// type of [GFCheckboxType] which is of four type is basic, square, circular and custom

lib/components/checkbox_list_tile/gf_checkbox_list_tile.dart

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ class GFCheckboxListTile extends StatelessWidget {
3535
this.selected = false,
3636
this.autofocus = false,
3737
}) : assert(value != null),
38+
assert(onChanged != null),
3839
assert(selected != null),
3940
assert(autofocus != null),
4041
super(key: key);

lib/components/dropdown/gf_dropdown.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ class GFDropdown<T> extends StatefulWidget {
3232
this.border = const BorderSide(
3333
color: Colors.transparent, width: 1, style: BorderStyle.solid),
3434
this.dropdownButtonColor = GFColors.WHITE})
35-
: super(key: key);
35+
: assert(onChanged != null),
36+
super(key: key);
3637

3738
final DropdownButtonBuilder selectedItemBuilder;
3839
final List<DropdownMenuItem<T>> items;

lib/components/image/gf_image_overlay.dart

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ class GFImageOverlay extends StatelessWidget {
1212
this.color,
1313
this.padding,
1414
this.margin,
15-
this.image,
15+
@required this.image,
1616
this.child = const Text(''),
1717
this.alignment,
1818
this.borderRadius,
@@ -22,6 +22,7 @@ class GFImageOverlay extends StatelessWidget {
2222
this.border,
2323
this.shape = BoxShape.rectangle,
2424
}) : assert(shape != null),
25+
assert(image != null),
2526
super(key: key);
2627

2728
/// define image's [double] height

0 commit comments

Comments
 (0)