Make pumpWidget's arguments named (#141728)
Much nicer calling API and simplifies evolving this API in the future. I wish we could write a dart fix for this, but that's blocked on https://github.com/dart-lang/sdk/issues/54668.
This commit is contained in:
committed by
GitHub
parent
9e024fdf31
commit
cc544169be
@@ -2,6 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
||||
|
||||
@@ -48,7 +49,7 @@ void main() {
|
||||
_testExecutions.add(execution);
|
||||
testWidgets(execution.name, experimentalLeakTesting: settings,
|
||||
(WidgetTester tester) async {
|
||||
await test.body(tester.pumpWidget, tester.runAsync);
|
||||
await test.body((Widget widget, [Duration? duration]) => tester.pumpWidget(widget, duration: duration), tester.runAsync);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user