Unverified Commit 4736cd3d authored by Polina Cherkasova's avatar Polina Cherkasova Committed by GitHub

Fix one notDisposed leak and mark another. (#133595)

parent acaa9735
...@@ -1005,6 +1005,12 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> { ...@@ -1005,6 +1005,12 @@ class ModalBottomSheetRoute<T> extends PopupRoute<T> {
final ValueNotifier<EdgeInsets> _clipDetailsNotifier = ValueNotifier<EdgeInsets>(EdgeInsets.zero); 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 /// Updates the details regarding how the [SemanticsNode.rect] (focus) of
/// the barrier for this [ModalBottomSheetRoute] should be clipped. /// the barrier for this [ModalBottomSheetRoute] should be clipped.
/// ///
......
...@@ -7,6 +7,7 @@ import 'dart:ui'; ...@@ -7,6 +7,7 @@ import 'dart:ui';
import 'package:flutter/foundation.dart'; import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart'; import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart'; import 'package:flutter_test/flutter_test.dart';
import 'package:leak_tracker_flutter_testing/leak_tracker_flutter_testing.dart';
import '../widgets/semantics_tester.dart'; import '../widgets/semantics_tester.dart';
...@@ -1672,7 +1673,8 @@ void main() { ...@@ -1672,7 +1673,8 @@ void main() {
}); });
group('Modal BottomSheet avoids overlapping display features', () { group('Modal BottomSheet avoids overlapping display features', () {
testWidgets('positioning using anchorPoint', (WidgetTester tester) async { testWidgetsWithLeakTracking('positioning using anchorPoint',
(WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
MaterialApp( MaterialApp(
builder: (BuildContext context, Widget? child) { builder: (BuildContext context, Widget? child) {
...@@ -1708,7 +1710,12 @@ void main() { ...@@ -1708,7 +1710,12 @@ void main() {
// Should take the right side of the screen // Should take the right side of the screen
expect(tester.getTopLeft(find.byType(Placeholder)).dx, 410); expect(tester.getTopLeft(find.byType(Placeholder)).dx, 410);
expect(tester.getBottomRight(find.byType(Placeholder)).dx, 800); 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 { testWidgets('positioning using Directionality', (WidgetTester tester) async {
await tester.pumpWidget( await tester.pumpWidget(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment