5
5
import 'package:flutter/cupertino.dart' ;
6
6
import 'package:flutter/rendering.dart' ;
7
7
import 'package:flutter_test/flutter_test.dart' ;
8
+ import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart' ;
8
9
9
10
void main () {
10
- testWidgets ('Shows header' , (WidgetTester tester) async {
11
+ testWidgetsWithLeakTracking ('Shows header' , (WidgetTester tester) async {
11
12
await tester.pumpWidget (
12
13
CupertinoApp (
13
14
home: Center (
@@ -22,7 +23,7 @@ void main() {
22
23
expect (find.text ('Header' ), findsOneWidget);
23
24
});
24
25
25
- testWidgets ('Shows footer' , (WidgetTester tester) async {
26
+ testWidgetsWithLeakTracking ('Shows footer' , (WidgetTester tester) async {
26
27
await tester.pumpWidget (
27
28
CupertinoApp (
28
29
home: Center (
@@ -37,7 +38,7 @@ void main() {
37
38
expect (find.text ('Footer' ), findsOneWidget);
38
39
});
39
40
40
- testWidgets ('Shows long dividers in edge-to-edge section part 1' , (WidgetTester tester) async {
41
+ testWidgetsWithLeakTracking ('Shows long dividers in edge-to-edge section part 1' , (WidgetTester tester) async {
41
42
await tester.pumpWidget (
42
43
CupertinoApp (
43
44
home: Center (
@@ -54,7 +55,7 @@ void main() {
54
55
expect (childrenColumn.children.length, 3 );
55
56
});
56
57
57
- testWidgets ('Shows long dividers in edge-to-edge section part 2' , (WidgetTester tester) async {
58
+ testWidgetsWithLeakTracking ('Shows long dividers in edge-to-edge section part 2' , (WidgetTester tester) async {
58
59
await tester.pumpWidget (
59
60
CupertinoApp (
60
61
home: Center (
@@ -75,7 +76,7 @@ void main() {
75
76
expect (childrenColumn.children.length, 5 );
76
77
});
77
78
78
- testWidgets ('Does not show long dividers in insetGrouped section part 1' , (WidgetTester tester) async {
79
+ testWidgetsWithLeakTracking ('Does not show long dividers in insetGrouped section part 1' , (WidgetTester tester) async {
79
80
await tester.pumpWidget (
80
81
CupertinoApp (
81
82
home: Center (
@@ -93,7 +94,7 @@ void main() {
93
94
expect (childrenColumn.children.length, 1 );
94
95
});
95
96
96
- testWidgets ('Does not show long dividers in insetGrouped section part 2' , (WidgetTester tester) async {
97
+ testWidgetsWithLeakTracking ('Does not show long dividers in insetGrouped section part 2' , (WidgetTester tester) async {
97
98
await tester.pumpWidget (
98
99
CupertinoApp (
99
100
restorationScopeId: 'App' ,
@@ -115,7 +116,7 @@ void main() {
115
116
expect (childrenColumn.children.length, 3 );
116
117
});
117
118
118
- testWidgets ('Sets background color for section' , (WidgetTester tester) async {
119
+ testWidgetsWithLeakTracking ('Sets background color for section' , (WidgetTester tester) async {
119
120
const Color backgroundColor = CupertinoColors .systemBlue;
120
121
121
122
await tester.pumpWidget (
@@ -138,7 +139,7 @@ void main() {
138
139
expect (boxDecoration.color, backgroundColor);
139
140
});
140
141
141
- testWidgets ('Setting clipBehavior clips children section' , (WidgetTester tester) async {
142
+ testWidgetsWithLeakTracking ('Setting clipBehavior clips children section' , (WidgetTester tester) async {
142
143
await tester.pumpWidget (
143
144
CupertinoApp (
144
145
home: Center (
@@ -153,7 +154,7 @@ void main() {
153
154
expect (find.byType (ClipRRect ), findsOneWidget);
154
155
});
155
156
156
- testWidgets ('Not setting clipBehavior does not produce a RenderClipRRect object' , (WidgetTester tester) async {
157
+ testWidgetsWithLeakTracking ('Not setting clipBehavior does not produce a RenderClipRRect object' , (WidgetTester tester) async {
157
158
await tester.pumpWidget (
158
159
CupertinoApp (
159
160
home: Center (
0 commit comments