TestWidgetsFlutterBinding should dispose old RestorationManager on reset. (#133999)

This commit is contained in:
Polina Cherkasova
2023-09-07 17:49:33 -07:00
committed by GitHub
parent e08173e767
commit 0d30546c74
2 changed files with 21 additions and 0 deletions

View File

@@ -244,6 +244,7 @@ abstract class TestWidgetsFlutterBinding extends BindingBase
/// If [registerTestTextInput] returns true when this method is called,
/// the [testTextInput] is configured to simulate the keyboard.
void reset() {
_restorationManager?.dispose();
_restorationManager = null;
resetGestureBinding();
testTextInput.reset();