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
5d5da388
Unverified
Commit
5d5da388
authored
Sep 08, 2023
by
Kostia Sokolovskyi
Committed by
GitHub
Sep 08, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix memory leak in _DraggableScrollableSheetState (#134212)
parent
834f5dc2
Changes
3
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
72 additions
and
52 deletions
+72
-52
draggable_scrollable_sheet.dart
...s/flutter/lib/src/widgets/draggable_scrollable_sheet.dart
+5
-1
about_test.dart
packages/flutter/test/material/about_test.dart
+1
-6
draggable_scrollable_sheet_test.dart
...flutter/test/widgets/draggable_scrollable_sheet_test.dart
+66
-45
No files found.
packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart
View file @
5d5da388
...
@@ -718,7 +718,11 @@ class _DraggableScrollableSheetState extends State<DraggableScrollableSheet> {
...
@@ -718,7 +718,11 @@ class _DraggableScrollableSheetState extends State<DraggableScrollableSheet> {
@override
@override
void
dispose
()
{
void
dispose
()
{
widget
.
controller
?.
_detach
(
disposeExtent:
true
);
if
(
widget
.
controller
==
null
)
{
_extent
.
dispose
();
}
else
{
widget
.
controller
!.
_detach
(
disposeExtent:
true
);
}
_scrollController
.
dispose
();
_scrollController
.
dispose
();
super
.
dispose
();
super
.
dispose
();
}
}
...
...
packages/flutter/test/material/about_test.dart
View file @
5d5da388
...
@@ -1590,12 +1590,7 @@ void main() {
...
@@ -1590,12 +1590,7 @@ void main() {
expect
(
titleOffset
,
const
Offset
(
292.0
,
136.0
));
expect
(
titleOffset
,
const
Offset
(
292.0
,
136.0
));
expect
(
titleOffset
.
dx
,
lessThan
(
wideSize
.
width
-
320
));
// Default master view width is 320.0.
expect
(
titleOffset
.
dx
,
lessThan
(
wideSize
.
width
-
320
));
// Default master view width is 320.0.
expect
(
tester
.
getCenter
(
find
.
byType
(
ListView
)),
const
Offset
(
160
,
356
));
expect
(
tester
.
getCenter
(
find
.
byType
(
ListView
)),
const
Offset
(
160
,
356
));
},
});
leakTrackingTestConfig:
const
LeakTrackingTestConfig
(
// TODO(polina-c): remove after fixing
// https://github.com/flutter/flutter/issues/133705
notDisposedAllowList:
<
String
,
int
?>
{
'ValueNotifier<double>'
:
5
},
));
testWidgets
(
'Material2 - LicensePage master view layout position - rtl'
,
(
WidgetTester
tester
)
async
{
testWidgets
(
'Material2 - LicensePage master view layout position - rtl'
,
(
WidgetTester
tester
)
async
{
const
TextDirection
textDirection
=
TextDirection
.
rtl
;
const
TextDirection
textDirection
=
TextDirection
.
rtl
;
...
...
packages/flutter/test/widgets/draggable_scrollable_sheet_test.dart
View file @
5d5da388
This diff is collapsed.
Click to expand it.
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