Skip to content

Commit 152f213

Browse files
committed
listile testing completed
1 parent 37c4b36 commit 152f213

File tree

10 files changed

+338
-281
lines changed

10 files changed

+338
-281
lines changed

lib/components/checkbox_list_tile/gf_checkbox_list_tile.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ class GFCheckboxListTile extends StatelessWidget {
99
@required this.value,
1010
@required this.onChanged,
1111
this.titleText,
12-
this.subtitleText,
12+
this.subTitleText,
1313
this.color,
1414
this.avatar,
1515
this.title,
16-
this.subtitle,
16+
this.subTitle,
1717
this.icon,
1818
this.description,
1919
this.padding = const EdgeInsets.all(8),
@@ -42,8 +42,8 @@ class GFCheckboxListTile extends StatelessWidget {
4242
///type of [String] used to pass text, alternative to title property and gets higher priority than title
4343
final String titleText;
4444

45-
///type of [String] used to pass text, alternative to subtitle property and gets higher priority than subtitle
46-
final String subtitleText;
45+
///type of [String] used to pass text, alternative to subTitle property and gets higher priority than subTitle
46+
final String subTitleText;
4747

4848
/// The GFListTile's background color. Can be given [Color] or [GFColors]
4949
final Color color;
@@ -55,8 +55,8 @@ class GFCheckboxListTile extends StatelessWidget {
5555
/// The title to display inside the [GFListTile]. see [Text]
5656
final Widget title;
5757

58-
/// The subtitle to display inside the [GFListTile]. see [Text]
59-
final Widget subtitle;
58+
/// The subTitle to display inside the [GFListTile]. see [Text]
59+
final Widget subTitle;
6060

6161
/// The description to display inside the [GFListTile]. see [Text]
6262
final Widget description;
@@ -142,8 +142,8 @@ class GFCheckboxListTile extends StatelessWidget {
142142
selected: selected,
143143
avatar: position == GFPosition.start ? checkbox : avatar,
144144
titleText: titleText,
145-
subtitle: subtitle,
146-
subtitleText: subtitleText,
145+
subTitle: subTitle,
146+
subTitleText: subTitleText,
147147
description: description,
148148
color: color,
149149
padding: padding,

lib/components/list_tile/gf_list_tile.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ class GFListTile extends StatelessWidget {
77
const GFListTile({
88
Key key,
99
this.titleText,
10-
this.subtitleText,
10+
this.subTitleText,
1111
this.color,
1212
this.avatar,
1313
this.title,
14-
this.subtitle,
14+
this.subTitle,
1515
this.description,
1616
this.icon,
1717
this.padding = const EdgeInsets.all(8),
@@ -32,8 +32,8 @@ class GFListTile extends StatelessWidget {
3232
/// type of [String] used to pass text, alternative to title property and gets higher priority than title
3333
final String titleText;
3434

35-
/// type of [String] used to pass text, alternative to subtitle property and gets higher priority than subtitle
36-
final String subtitleText;
35+
/// type of [String] used to pass text, alternative to subTitle property and gets higher priority than subTitle
36+
final String subTitleText;
3737

3838
/// The GFListTile's background color. Can be given [Color] or [GFColors]
3939
final Color color;
@@ -44,8 +44,8 @@ class GFListTile extends StatelessWidget {
4444
/// The title to display inside the [GFListTile]. see [Text]
4545
final Widget title;
4646

47-
/// The subtitle to display inside the [GFListTile]. see [Text]
48-
final Widget subtitle;
47+
/// The subTitle to display inside the [GFListTile]. see [Text]
48+
final Widget subTitle;
4949

5050
/// The description to display inside the [GFListTile]. see [Text]
5151
final Widget description;
@@ -134,15 +134,15 @@ class GFListTile extends StatelessWidget {
134134
color: GFColors.DARK),
135135
)
136136
: title ?? Container(),
137-
subtitleText != null
137+
subTitleText != null
138138
? Text(
139-
subtitleText,
139+
subTitleText,
140140
style: const TextStyle(
141141
fontSize: 14.5,
142142
color: Colors.black54,
143143
),
144144
)
145-
: subtitle ?? Container(),
145+
: subTitle ?? Container(),
146146
description ?? Container()
147147
],
148148
),

lib/components/radio_list_tile/gf_radio_list_tile.dart

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ class GFRadioListTile<T> extends StatelessWidget {
2727
this.focusNode,
2828
this.toggleable = false,
2929
this.titleText,
30-
this.subtitleText,
30+
this.subTitleText,
3131
this.color,
3232
this.avatar,
3333
this.title,
34-
this.subtitle,
34+
this.subTitle,
3535
this.description,
3636
this.icon,
3737
this.padding = const EdgeInsets.all(8),
@@ -51,8 +51,8 @@ class GFRadioListTile<T> extends StatelessWidget {
5151
///type of [String] used to pass text, alternative to title property and gets higher priority than title
5252
final String titleText;
5353

54-
///type of [String] used to pass text, alternative to subtitle property and gets higher priority than subtitle
55-
final String subtitleText;
54+
///type of [String] used to pass text, alternative to subTitle property and gets higher priority than subTitle
55+
final String subTitleText;
5656

5757
/// The GFListTile's background color. Can be given [Color] or [GFColors]
5858
final Color color;
@@ -63,8 +63,8 @@ class GFRadioListTile<T> extends StatelessWidget {
6363
/// The title to display inside the [GFListTile]. see [Text]
6464
final Widget title;
6565

66-
/// The subtitle to display inside the [GFListTile]. see [Text]
67-
final Widget subtitle;
66+
/// The subTitle to display inside the [GFListTile]. see [Text]
67+
final Widget subTitle;
6868

6969
/// The description to display inside the [GFListTile]. see [Text]
7070
final Widget description;
@@ -199,8 +199,8 @@ class GFRadioListTile<T> extends StatelessWidget {
199199
selected: selected,
200200
avatar: position == GFPosition.start ? radio : avatar,
201201
titleText: titleText,
202-
subtitle: subtitle,
203-
subtitleText: subtitleText,
202+
subTitle: subTitle,
203+
subTitleText: subTitleText,
204204
description: description,
205205
color: color,
206206
padding: padding,

pubspec.lock

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ packages:
192192
name: meta
193193
url: "https://pub.dartlang.org"
194194
source: hosted
195-
version: "1.3.0-nullsafety.3"
195+
version: "1.3.0-nullsafety.4"
196196
mime:
197197
dependency: transitive
198198
description:
@@ -323,7 +323,7 @@ packages:
323323
name: stack_trace
324324
url: "https://pub.dartlang.org"
325325
source: hosted
326-
version: "1.10.0-nullsafety.1"
326+
version: "1.10.0-nullsafety.2"
327327
stream_channel:
328328
dependency: transitive
329329
description:
@@ -416,4 +416,4 @@ packages:
416416
source: hosted
417417
version: "2.2.1"
418418
sdks:
419-
dart: ">=2.10.0-110 <2.11.0"
419+
dart: ">=2.10.0-110 <=2.11.0-213.1.beta"

test/alert_test.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ void main() {
88
width: 100,
99
height: 100,
1010
);
11-
final bgColor = Colors.teal;
11+
const bgColor = Colors.teal;
1212
const contentChild = Icon(Icons.umbrella);
1313
const child = Text('Get Widget');
1414

@@ -30,13 +30,13 @@ void main() {
3030
testWidgets('Basic GFAlert.', (tester) async {
3131
const basicType = GFAlertType.basic;
3232

33-
final GFAlert alert = GFAlert(
33+
const GFAlert alert = GFAlert(
3434
backgroundColor: bgColor,
3535
contentChild: contentChild,
3636
type: basicType,
3737
child: child);
3838

39-
final TestApp app = TestApp(alert);
39+
const TestApp app = TestApp(alert);
4040

4141
await tester.pumpWidget(Container(child: childWidget));
4242
expect(find.byWidget(childWidget), findsOneWidget);

test/bottom_sheet_test.dart

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ void main() {
99
final GFBottomSheetController _controller = GFBottomSheetController();
1010

1111
testWidgets('GFBottomSheet without value', (tester) async {
12-
// `GFBottomSheet.contentBody` null
12+
// `GFBottomSheet.contentBody` null
1313
expect(
1414
() => GFBottomSheet(
1515
contentBody: null,
@@ -28,7 +28,7 @@ void main() {
2828
backgroundColor: Colors.amber,
2929
),
3030
titleText: 'Header Title',
31-
subtitleText: '11 minutes ago',
31+
subTitleText: '11 minutes ago',
3232
),
3333
contentBody: ListView(
3434
shrinkWrap: true,
@@ -45,7 +45,7 @@ void main() {
4545
backgroundColor: Colors.tealAccent,
4646
size: 20,
4747
),
48-
subtitleText: 'Content Title',
48+
subTitleText: 'Content Title',
4949
icon: GFButton(
5050
onPressed: () {},
5151
color: Colors.teal,
@@ -116,7 +116,7 @@ void main() {
116116
backgroundColor: Colors.amber,
117117
),
118118
titleText: 'Header Title',
119-
subtitleText: '11 minutes ago',
119+
subTitleText: '11 minutes ago',
120120
),
121121
contentBody: ListView(
122122
shrinkWrap: true,
@@ -176,7 +176,7 @@ void main() {
176176
backgroundColor: Colors.amber,
177177
),
178178
titleText: 'Header Title',
179-
subtitleText: '11 minutes ago',
179+
subTitleText: '11 minutes ago',
180180
),
181181
contentBody: ListView(
182182
key: contentKey,
@@ -258,7 +258,7 @@ void main() {
258258
backgroundColor: Colors.amber,
259259
),
260260
titleText: 'Header Title',
261-
subtitleText: '11 minutes ago',
261+
subTitleText: '11 minutes ago',
262262
),
263263
contentBody: ListView(
264264
key: contentKey,

test/card_test.dart

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ Future<void> main() async {
99
height: 100,
1010
);
1111

12-
final color = Colors.white;
12+
const color = Colors.white;
1313
const elevation = 2.0;
1414
const borderOnForeground = false;
1515
const padding = EdgeInsets.symmetric(horizontal: 12, vertical: 8);
@@ -236,12 +236,12 @@ Future<void> main() async {
236236
titleText: 'Card Title',
237237
icon: Icon(Icons.favorite_border),
238238
);
239-
final GFCard card = GFCard(
239+
const GFCard card = GFCard(
240240
color: color,
241241
title: customTitle,
242242
);
243243

244-
final TestApp app = TestApp(card);
244+
const TestApp app = TestApp(card);
245245

246246
await tester.pumpWidget(app);
247247

@@ -251,20 +251,20 @@ Future<void> main() async {
251251
expect(app.card.title, customTitle);
252252
});
253253

254-
testWidgets('GF Card with GFAvatar & Subtitle in title section.',
254+
testWidgets('GF Card with GFAvatar & subTitle in title section.',
255255
(tester) async {
256256
const customTitle = GFListTile(
257257
avatar: GFAvatar(),
258258
titleText: 'Card Title',
259-
subtitleText: 'Sub title',
259+
subTitleText: 'Sub title',
260260
icon: Icon(Icons.favorite_border),
261261
);
262-
final GFCard card = GFCard(
262+
const GFCard card = GFCard(
263263
color: color,
264264
title: customTitle,
265265
);
266266

267-
final TestApp app = TestApp(card);
267+
const TestApp app = TestApp(card);
268268

269269
await tester.pumpWidget(app);
270270

@@ -282,7 +282,7 @@ Future<void> main() async {
282282
ColorFilter.mode(Colors.black.withOpacity(0.67), BlendMode.darken);
283283
const customTitle = GFListTile(
284284
titleText: 'Card Title',
285-
subtitleText: 'Sub title',
285+
subTitleText: 'Sub title',
286286
);
287287
final GFCard card = GFCard(
288288
color: color,
@@ -311,7 +311,7 @@ Future<void> main() async {
311311
const customTitle = GFListTile(
312312
avatar: GFAvatar(),
313313
titleText: 'Card Title',
314-
subtitleText: 'Sub title',
314+
subTitleText: 'Sub title',
315315
icon: Icon(Icons.favorite_border),
316316
);
317317
const customButtonBar = GFButtonBar(

0 commit comments

Comments
 (0)