Fix one notDisposed leak and mark another. (#133595)
This commit is contained in:
parent
acaa97350a
commit
4736cd3d37
@ -1005,6 +1005,12 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> {
|
||||
|
||||
final ValueNotifier<EdgeInsets> _clipDetailsNotifier = ValueNotifier<EdgeInsets>(EdgeInsets.zero);
|
||||
|
||||
@override
|
||||
void dispose() {
|
||||
_clipDetailsNotifier.dispose();
|
||||
super.dispose();
|
||||
}
|
||||
|
||||
/// Updates the details regarding how the [SemanticsNode.rect] (focus) of
|
||||
/// the barrier for this [ModalBottomSheetRoute] should be clipped.
|
||||
///
|
||||
|
@ -7,6 +7,7 @@ import 'dart:ui';
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
|
||||
|
||||
import '../widgets/semantics_tester.dart';
|
||||
|
||||
@ -1672,7 +1673,8 @@ void main() {
|
||||
});
|
||||
|
||||
group('Modal BottomSheet avoids overlapping display features', () {
|
||||
testWidgets('positioning using anchorPoint', (WidgetTester tester) async {
|
||||
testWidgetsWithLeakTracking('positioning using anchorPoint',
|
||||
(WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
MaterialApp(
|
||||
builder: (BuildContext context, Widget? child) {
|
||||
@ -1708,7 +1710,12 @@ void main() {
|
||||
// Should take the right side of the screen
|
||||
expect(tester.getTopLeft(find.byType(Placeholder)).dx, 410);
|
||||
expect(tester.getBottomRight(find.byType(Placeholder)).dx, 800);
|
||||
});
|
||||
},
|
||||
leakTrackingTestConfig: const LeakTrackingTestConfig(
|
||||
// TODO(polina-c): remove after fix
|
||||
// https://github.com/flutter/flutter/issues/133594
|
||||
notDisposedAllowList: <String, int?> {'ValueNotifier<EdgeInsets>': 1}
|
||||
));
|
||||
|
||||
testWidgets('positioning using Directionality', (WidgetTester tester) async {
|
||||
await tester.pumpWidget(
|
||||
|
Loading…
x
Reference in New Issue
Block a user