@@ -15,7 +15,6 @@ import 'package:flutter/services.dart';
15
15
import 'package:flutter/widgets.dart' ;
16
16
import 'package:stack_trace/stack_trace.dart' as stack_trace;
17
17
import 'package:test_api/expect.dart' show fail;
18
- import 'package:test_api/scaffolding.dart' ; // ignore: deprecated_member_use
19
18
import 'package:test_api/test_api.dart' as test_package show Timeout; // ignore: deprecated_member_use
20
19
import 'package:vector_math/vector_math_64.dart' ;
21
20
@@ -920,13 +919,6 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
920
919
// So that we can assert that it remains the same after the test finishes.
921
920
_beforeTestCheckIntrinsicSizes = debugCheckIntrinsicSizes;
922
921
923
- bool shouldTearDownVerifyInvariants = false ;
924
- addTearDown (() {
925
- if (shouldTearDownVerifyInvariants) {
926
- _verifyTearDownInvariants ();
927
- }
928
- });
929
-
930
922
runApp (Container (key: UniqueKey (), child: _preTestMessage)); // Reset the tree to a known state.
931
923
await pump ();
932
924
// Pretend that the first frame produced in the test body is the first frame
@@ -957,7 +949,6 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
957
949
_verifyErrorWidgetBuilderUnset (errorWidgetBuilderBeforeTest);
958
950
_verifyShouldPropagateDevicePointerEventsUnset (shouldPropagateDevicePointerEventsBeforeTest);
959
951
_verifyInvariants ();
960
- shouldTearDownVerifyInvariants = true ;
961
952
}
962
953
963
954
assert (inTest);
@@ -967,11 +958,6 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
967
958
late bool _beforeTestCheckIntrinsicSizes;
968
959
969
960
void _verifyInvariants () {
970
- // subclasses such as AutomatedTestWidgetsFlutterBinding overrides this
971
- // to perform more verifications.
972
- }
973
-
974
- void _verifyTearDownInvariants () {
975
961
assert (debugAssertNoTransientCallbacks (
976
962
'An animation is still running even after the widget tree was disposed.'
977
963
));
0 commit comments