Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Sign in
Toggle navigation
F
Front-End
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
abdullh.alsoleman
Front-End
Commits
4736cd3d
Unverified
Commit
4736cd3d
authored
Aug 29, 2023
by
Polina Cherkasova
Committed by
GitHub
Aug 29, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix one notDisposed leak and mark another. (#133595)
parent
acaa9735
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
2 deletions
+15
-2
bottom_sheet.dart
packages/flutter/lib/src/material/bottom_sheet.dart
+6
-0
bottom_sheet_test.dart
packages/flutter/test/material/bottom_sheet_test.dart
+9
-2
No files found.
packages/flutter/lib/src/material/bottom_sheet.dart
View file @
4736cd3d
...
...
@@ -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.
///
...
...
packages/flutter/test/material/bottom_sheet_test.dart
View file @
4736cd3d
...
...
@@ -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
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment