Skip to content

Commit 4e7d3ba

Browse files
committed
bottomsheet testing completed
1 parent f179cf7 commit 4e7d3ba

File tree

3 files changed

+27
-27
lines changed

3 files changed

+27
-27
lines changed

example/lib/main_temp.dart

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -524,7 +524,7 @@ class _MyHomePageState extends State<MyHomePage>
524524
// ),
525525
],
526526
),
527-
backgroundColor: Colors.blueGrey,
527+
backgroundColor: Colors.blueGrey,
528528
body:
529529

530530
// GFTabBarView(
@@ -2089,17 +2089,18 @@ class _MyHomePageState extends State<MyHomePage>
20892089
subtitleText: '11 minutes ago',
20902090
),
20912091
contentBody: ListView(
2092-
shrinkWrap: true,
2093-
physics: const ScrollPhysics(),
2094-
children: [
2095-
const Text('Content GetWidget'),
2096-
Container(
2097-
padding: const EdgeInsets.all(16),
2098-
child: const Text('Get Widget is one of the largest Flutter open-source '
2099-
'UI library for mobile or web apps. It has more than 1000+ pre-built reusable widgets.'),
2100-
),
2101-
],
2102-
),
2092+
shrinkWrap: true,
2093+
physics: const ScrollPhysics(),
2094+
children: [
2095+
const Text('Content GetWidget'),
2096+
Container(
2097+
padding: const EdgeInsets.all(16),
2098+
child: const Text(
2099+
'Get Widget is one of the largest Flutter open-source '
2100+
'UI library for mobile or web apps. It has more than 1000+ pre-built reusable widgets.'),
2101+
),
2102+
],
2103+
),
21032104
stickyFooterHeight: 60,
21042105
stickyFooter: Container(
21052106
alignment: AlignmentDirectional.center,

test/bottom_sheet_test.dart

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,8 @@ void main() {
125125
const Text('Content GetWidget'),
126126
Container(
127127
padding: const EdgeInsets.all(16),
128-
child: const Text('Get Widget is one of the largest Flutter open-source '
128+
child: const Text(
129+
'Get Widget is one of the largest Flutter open-source '
129130
'UI library for mobile or web apps. It has more than 1000+ pre-built reusable widgets.'),
130131
),
131132
],
@@ -161,10 +162,10 @@ void main() {
161162
await tester.pump(const Duration(seconds: 2));
162163
// try to find content finds nothing
163164
expect(find.text('Content GetWidget'), findsNothing);
164-
165165
});
166166

167-
testWidgets('GFBottomSheet can be constructed with expandable content', (tester) async {
167+
testWidgets('GFBottomSheet can be constructed with expandable content',
168+
(tester) async {
168169
final GFBottomSheet bottomSheet = GFBottomSheet(
169170
key: bottomSheetKey,
170171
controller: _controller,
@@ -185,7 +186,8 @@ void main() {
185186
const Text('Content GetWidget'),
186187
Container(
187188
padding: const EdgeInsets.all(16),
188-
child: const Text('Get Widget is one of the largest Flutter open-source '
189+
child: const Text(
190+
'Get Widget is one of the largest Flutter open-source '
189191
'UI library for mobile or web apps. It has more than 1000+ pre-built reusable widgets.'),
190192
),
191193
],
@@ -244,7 +246,6 @@ void main() {
244246
await tester.pump(const Duration(seconds: 5));
245247
// try to find content body, finds nothing
246248
expect(find.text('Content GetWidget'), findsNothing);
247-
248249
});
249250

250251
testWidgets('GFBottomSheet with properties', (tester) async {
@@ -267,7 +268,8 @@ void main() {
267268
const Text('Content GetWidget'),
268269
Container(
269270
padding: const EdgeInsets.all(16),
270-
child: const Text('Get Widget is one of the largest Flutter open-source '
271+
child: const Text(
272+
'Get Widget is one of the largest Flutter open-source '
271273
'UI library for mobile or web apps. It has more than 1000+ pre-built reusable widgets.'),
272274
),
273275
],

test/rating_test.dart

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -96,16 +96,14 @@ void main() {
9696
double _rating = 3;
9797

9898
final rating = GFRating(
99-
key: ratingKey,
100-
value: _rating,
101-
allowHalfRating: true,
102-
onChanged: (value) {
103-
_rating = value;
104-
},
105-
99+
key: ratingKey,
100+
value: _rating,
101+
allowHalfRating: true,
102+
onChanged: (value) {
103+
_rating = value;
104+
},
106105
);
107106

108-
109107
final TestApp app = TestApp(rating);
110108
await tester.pumpWidget(app);
111109

@@ -119,7 +117,6 @@ void main() {
119117
await tester.pump(const Duration(seconds: 2));
120118
// find rating 5 star
121119
expect(_rating, 5);
122-
123120
});
124121

125122
testWidgets('GF Rating using textFormField data input.',

0 commit comments

Comments
 (0)