Fix leaky test. (#149823)
Introduced by https://github.com/flutter/flutter/pull/148094
This commit is contained in:
committed by
GitHub
parent
b73cd1bee0
commit
440b1c64aa
@@ -195,11 +195,14 @@ void main() {
|
||||
});
|
||||
|
||||
testWidgets('CarouselController initialItem', (WidgetTester tester) async {
|
||||
final CarouselController controller = CarouselController(initialItem: 5);
|
||||
addTearDown(controller.dispose);
|
||||
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
home: Scaffold(
|
||||
body: CarouselView(
|
||||
controller: CarouselController(initialItem: 5),
|
||||
controller: controller,
|
||||
itemExtent: 400,
|
||||
children: List<Widget>.generate(10, (int index) {
|
||||
return Center(
|
||||
|
||||
Reference in New Issue
Block a user