Skip to content

Commit 11235ef

Browse files
Merge pull request #220 from Sandipkakadiya/review
Release
2 parents 9bceb78 + e8dffba commit 11235ef

File tree

87 files changed

+10375
-1406
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

87 files changed

+10375
-1406
lines changed

CHANGELOG.md

+11
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,17 @@
11
# Changelog
22

33

4+
## 2.0.1-nullsafety.4 - 2021-03-17
5+
6+
### Added
7+
* Added test cases.
8+
9+
## 2.0.0-nullsafety.3 - 2021-03-09
10+
11+
### Added
12+
* Added nullsafety.
13+
14+
415
## 1.2.4 - 2020-11-12
516

617
### Fixed

example/pubspec.lock

+43-43
Original file line numberDiff line numberDiff line change
@@ -7,42 +7,42 @@ packages:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.5.0-nullsafety.1"
10+
version: "2.5.0"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
1414
name: boolean_selector
1515
url: "https://pub.dartlang.org"
1616
source: hosted
17-
version: "2.1.0-nullsafety.1"
17+
version: "2.1.0"
1818
characters:
1919
dependency: transitive
2020
description:
2121
name: characters
2222
url: "https://pub.dartlang.org"
2323
source: hosted
24-
version: "1.1.0-nullsafety.3"
24+
version: "1.1.0"
2525
charcode:
2626
dependency: transitive
2727
description:
2828
name: charcode
2929
url: "https://pub.dartlang.org"
3030
source: hosted
31-
version: "1.2.0-nullsafety.1"
31+
version: "1.2.0"
3232
clock:
3333
dependency: transitive
3434
description:
3535
name: clock
3636
url: "https://pub.dartlang.org"
3737
source: hosted
38-
version: "1.1.0-nullsafety.1"
38+
version: "1.1.0"
3939
collection:
4040
dependency: transitive
4141
description:
4242
name: collection
4343
url: "https://pub.dartlang.org"
4444
source: hosted
45-
version: "1.15.0-nullsafety.3"
45+
version: "1.15.0"
4646
convert:
4747
dependency: transitive
4848
description:
@@ -63,7 +63,7 @@ packages:
6363
name: fake_async
6464
url: "https://pub.dartlang.org"
6565
source: hosted
66-
version: "1.2.0-nullsafety.1"
66+
version: "1.2.0"
6767
flutter:
6868
dependency: "direct main"
6969
description: flutter
@@ -92,28 +92,35 @@ packages:
9292
path: ".."
9393
relative: true
9494
source: path
95-
version: "1.2.4"
95+
version: "2.0.1-nullsafety.4"
96+
js:
97+
dependency: transitive
98+
description:
99+
name: js
100+
url: "https://pub.dartlang.org"
101+
source: hosted
102+
version: "0.6.3"
96103
matcher:
97104
dependency: transitive
98105
description:
99106
name: matcher
100107
url: "https://pub.dartlang.org"
101108
source: hosted
102-
version: "0.12.10-nullsafety.1"
109+
version: "0.12.10"
103110
meta:
104111
dependency: transitive
105112
description:
106113
name: meta
107114
url: "https://pub.dartlang.org"
108115
source: hosted
109-
version: "1.3.0-nullsafety.3"
116+
version: "1.3.0"
110117
path:
111118
dependency: transitive
112119
description:
113120
name: path
114121
url: "https://pub.dartlang.org"
115122
source: hosted
116-
version: "1.8.0-nullsafety.1"
123+
version: "1.8.0"
117124
path_drawing:
118125
dependency: transitive
119126
description:
@@ -134,28 +141,14 @@ packages:
134141
name: petitparser
135142
url: "https://pub.dartlang.org"
136143
source: hosted
137-
version: "3.0.4"
138-
platform_detect:
139-
dependency: transitive
140-
description:
141-
name: platform_detect
142-
url: "https://pub.dartlang.org"
143-
source: hosted
144-
version: "1.4.0"
144+
version: "3.1.0"
145145
plugin_platform_interface:
146146
dependency: transitive
147147
description:
148148
name: plugin_platform_interface
149149
url: "https://pub.dartlang.org"
150150
source: hosted
151-
version: "1.0.1"
152-
pub_semver:
153-
dependency: transitive
154-
description:
155-
name: pub_semver
156-
url: "https://pub.dartlang.org"
157-
source: hosted
158-
version: "1.4.4"
151+
version: "1.0.3"
159152
sky_engine:
160153
dependency: transitive
161154
description: flutter
@@ -167,98 +160,105 @@ packages:
167160
name: source_span
168161
url: "https://pub.dartlang.org"
169162
source: hosted
170-
version: "1.8.0-nullsafety.2"
163+
version: "1.8.0"
171164
stack_trace:
172165
dependency: transitive
173166
description:
174167
name: stack_trace
175168
url: "https://pub.dartlang.org"
176169
source: hosted
177-
version: "1.10.0-nullsafety.1"
170+
version: "1.10.0"
178171
stream_channel:
179172
dependency: transitive
180173
description:
181174
name: stream_channel
182175
url: "https://pub.dartlang.org"
183176
source: hosted
184-
version: "2.1.0-nullsafety.1"
177+
version: "2.1.0"
185178
string_scanner:
186179
dependency: transitive
187180
description:
188181
name: string_scanner
189182
url: "https://pub.dartlang.org"
190183
source: hosted
191-
version: "1.1.0-nullsafety.1"
184+
version: "1.1.0"
192185
term_glyph:
193186
dependency: transitive
194187
description:
195188
name: term_glyph
196189
url: "https://pub.dartlang.org"
197190
source: hosted
198-
version: "1.2.0-nullsafety.1"
191+
version: "1.2.0"
199192
test_api:
200193
dependency: transitive
201194
description:
202195
name: test_api
203196
url: "https://pub.dartlang.org"
204197
source: hosted
205-
version: "0.2.19-nullsafety.2"
198+
version: "0.2.19"
206199
typed_data:
207200
dependency: transitive
208201
description:
209202
name: typed_data
210203
url: "https://pub.dartlang.org"
211204
source: hosted
212-
version: "1.3.0-nullsafety.3"
205+
version: "1.3.0"
213206
url_launcher:
214207
dependency: "direct main"
215208
description:
216209
name: url_launcher
217210
url: "https://pub.dartlang.org"
218211
source: hosted
219-
version: "5.5.3"
212+
version: "5.7.10"
220213
url_launcher_linux:
221214
dependency: transitive
222215
description:
223216
name: url_launcher_linux
224217
url: "https://pub.dartlang.org"
225218
source: hosted
226-
version: "0.0.1+1"
219+
version: "0.0.1+4"
227220
url_launcher_macos:
228221
dependency: transitive
229222
description:
230223
name: url_launcher_macos
231224
url: "https://pub.dartlang.org"
232225
source: hosted
233-
version: "0.0.1+7"
226+
version: "0.0.1+9"
234227
url_launcher_platform_interface:
235228
dependency: transitive
236229
description:
237230
name: url_launcher_platform_interface
238231
url: "https://pub.dartlang.org"
239232
source: hosted
240-
version: "1.0.8"
233+
version: "1.0.9"
241234
url_launcher_web:
242235
dependency: transitive
243236
description:
244237
name: url_launcher_web
245238
url: "https://pub.dartlang.org"
246239
source: hosted
247-
version: "0.1.3+2"
240+
version: "0.1.5+3"
241+
url_launcher_windows:
242+
dependency: transitive
243+
description:
244+
name: url_launcher_windows
245+
url: "https://pub.dartlang.org"
246+
source: hosted
247+
version: "0.0.1+3"
248248
vector_math:
249249
dependency: transitive
250250
description:
251251
name: vector_math
252252
url: "https://pub.dartlang.org"
253253
source: hosted
254-
version: "2.1.0-nullsafety.3"
254+
version: "2.1.0"
255255
xml:
256256
dependency: transitive
257257
description:
258258
name: xml
259259
url: "https://pub.dartlang.org"
260260
source: hosted
261-
version: "4.2.0"
261+
version: "4.5.1"
262262
sdks:
263-
dart: ">=2.10.0-110 <2.11.0"
264-
flutter: ">=1.18.0-6.0.pre <2.0.0"
263+
dart: ">=2.12.0 <3.0.0"
264+
flutter: ">=1.22.0"

lib/components/accordian/gf_accordian.dart renamed to lib/components/accordion/gf_accordion.dart

+18-18
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,19 @@ import 'package:getwidget/getwidget.dart';
44
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(
7-
{Key key,
8-
this.titleChild,
7+
{Key? key,
8+
this.title,
99
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,
1516
this.textStyle = const TextStyle(color: Colors.black, fontSize: 16),
1617
this.titlePadding = const EdgeInsets.all(10),
1718
this.contentBackgroundColor,
1819
this.contentPadding = const EdgeInsets.all(10),
19-
this.contentChild,
2020
this.titleBorder = const Border(),
2121
this.contentBorder = const Border(),
2222
this.margin,
@@ -30,13 +30,13 @@ class GFAccordion extends StatefulWidget {
3030
final bool showAccordion;
3131

3232
/// child of type [Widget]is alternative to title key. title will get priority over titleChild
33-
final Widget titleChild;
33+
final Widget? titleChild;
3434

3535
/// content of type[String] which shows the messages after the [GFAccordion] is expanded
36-
final String content;
36+
final String? content;
3737

3838
/// contentChild of type [Widget]is alternative to content key. content will get priority over contentChild
39-
final Widget contentChild;
39+
final Widget? contentChild;
4040

4141
/// type of [Color] or [GFColors] which is used to change the background color of the [GFAccordion] title when it is collapsed
4242
final Color collapsedTitleBackgroundColor;
@@ -51,7 +51,7 @@ class GFAccordion extends StatefulWidget {
5151
final Widget expandedIcon;
5252

5353
/// text of type [String] is alternative to child. text will get priority over titleChild
54-
final String title;
54+
final String? title;
5555

5656
/// textStyle of type [textStyle] will be applicable to text only and not for the child
5757
final TextStyle textStyle;
@@ -63,10 +63,10 @@ class GFAccordion extends StatefulWidget {
6363
final EdgeInsets contentPadding;
6464

6565
/// type of [Color] or [GFColors] which is used to change the background color of the [GFAccordion] description
66-
final Color contentBackgroundColor;
66+
final Color? contentBackgroundColor;
6767

6868
/// margin of type [EdgeInsets] which is used to set the margin of the [GFAccordion]
69-
final EdgeInsets margin;
69+
final EdgeInsets? margin;
7070

7171
/// titleBorderColor of type [Color] or [GFColors] which is used to change the border color of title
7272
final Border titleBorder;
@@ -81,18 +81,18 @@ class GFAccordion extends StatefulWidget {
8181
final BorderRadius contentBorderRadius;
8282

8383
/// function called when the content body collapsed
84-
final Function(bool) onToggleCollapsed;
84+
final Function(bool)? onToggleCollapsed;
8585

8686
@override
8787
_GFAccordionState createState() => _GFAccordionState();
8888
}
8989

9090
class _GFAccordionState extends State<GFAccordion>
9191
with TickerProviderStateMixin {
92-
AnimationController animationController;
93-
AnimationController controller;
94-
Animation<Offset> offset;
95-
bool showAccordion;
92+
late AnimationController animationController;
93+
late AnimationController controller;
94+
late Animation<Offset> offset;
95+
late bool showAccordion;
9696

9797
@override
9898
void initState() {
@@ -142,7 +142,7 @@ class _GFAccordionState extends State<GFAccordion>
142142
children: <Widget>[
143143
Expanded(
144144
child: widget.title != null
145-
? Text(widget.title, style: widget.textStyle)
145+
? Text(widget.title!, style: widget.textStyle)
146146
: (widget.titleChild ?? Container()),
147147
),
148148
showAccordion ? widget.expandedIcon : widget.collapsedIcon
@@ -162,7 +162,7 @@ class _GFAccordionState extends State<GFAccordion>
162162
child: SlideTransition(
163163
position: offset,
164164
child: widget.content != null
165-
? Text(widget.content)
165+
? Text(widget.content!)
166166
: (widget.contentChild ?? Container()),
167167
))
168168
: Container()
@@ -183,7 +183,7 @@ class _GFAccordionState extends State<GFAccordion>
183183
}
184184
showAccordion = !showAccordion;
185185
if (widget.onToggleCollapsed != null) {
186-
widget.onToggleCollapsed(showAccordion);
186+
widget.onToggleCollapsed!(showAccordion);
187187
}
188188
});
189189
}

0 commit comments

Comments
 (0)