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
cec14574
Unverified
Commit
cec14574
authored
Sep 09, 2021
by
xubaolin
Committed by
GitHub
Sep 09, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix a DraggableScrollableSheet bug (#89335)
parent
1745402d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
0 deletions
+25
-0
draggable_scrollable_sheet.dart
...s/flutter/lib/src/widgets/draggable_scrollable_sheet.dart
+7
-0
draggable_scrollable_sheet_test.dart
...flutter/test/widgets/draggable_scrollable_sheet_test.dart
+18
-0
No files found.
packages/flutter/lib/src/widgets/draggable_scrollable_sheet.dart
View file @
cec14574
...
...
@@ -466,6 +466,13 @@ class _DraggableScrollableSheetScrollPosition
}
}
@override
void
dispose
()
{
// Stop the animation before dispose.
_ballisticCancelCallback
?.
call
();
super
.
dispose
();
}
@override
void
goBallistic
(
double
velocity
)
{
if
(
velocity
==
0.0
||
...
...
packages/flutter/test/widgets/draggable_scrollable_sheet_test.dart
View file @
cec14574
...
...
@@ -344,5 +344,23 @@ void main() {
];
expect
(
notificationTypes
,
types
);
});
testWidgets
(
'Do not crash when remove the tree during animation.'
,
(
WidgetTester
tester
)
async
{
// Regression test for https://github.com/flutter/flutter/issues/89214
await
tester
.
pumpWidget
(
_boilerplate
(
null
,
onScrollNotification:
(
ScrollNotification
notification
)
{
return
false
;
},
));
await
tester
.
flingFrom
(
const
Offset
(
0
,
325
),
const
Offset
(
0
,
325
),
200
);
// The animation is running.
await
tester
.
pumpWidget
(
const
SizedBox
.
shrink
());
expect
(
tester
.
takeException
(),
isNull
);
});
}
}
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