Fixes https://github.com/flutter/flutter/issues/132769
This commit is contained in:
Polina Cherkasova 2023-08-17 12:11:24 -07:00 committed by GitHub
parent f0bfd7d641
commit aa1bacb35a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 3 additions and 8 deletions

View File

@ -303,6 +303,7 @@ class _MenuAnchorState extends State<MenuAnchor> {
_anchorChildren.clear();
_menuController._detach(this);
_internalMenuController = null;
_menuScopeNode.dispose();
super.dispose();
}
@ -551,6 +552,7 @@ class _MenuAnchorState extends State<MenuAnchor> {
}
_closeChildren(inDispose: inDispose);
_overlayEntry?.remove();
_overlayEntry?.dispose();
_overlayEntry = null;
if (!inDispose) {
// Notify that _childIsOpen changed state, but only if not

View File

@ -1480,6 +1480,7 @@ class FocusManager with DiagnosticableTreeMixin, ChangeNotifier {
@override
void dispose() {
_highlightManager.dispose();
rootScope.dispose();
super.dispose();
}

View File

@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Fails with "flutter test --test-randomize-ordering-seed=20230817"
@Tags(<String>['no-shuffle'])
library;
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';

View File

@ -2,10 +2,6 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Fails with "flutter test --test-randomize-ordering-seed=20230817"
@Tags(<String>['no-shuffle'])
library;
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';