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
14f00790
Unverified
Commit
14f00790
authored
Jun 03, 2021
by
Angjie Li
Committed by
GitHub
Jun 03, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "fix a Scaffold.bottomSheet update bug (#83689)" (#83904)
This reverts commit
9a243a12
.
parent
84adcbb8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
24 deletions
+1
-24
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+1
-7
persistent_bottom_sheet_test.dart
...s/flutter/test/material/persistent_bottom_sheet_test.dart
+0
-17
No files found.
packages/flutter/lib/src/material/scaffold.dart
View file @
14f00790
...
...
@@ -2415,7 +2415,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
// bottom sheet.
final
List
<
_StandardBottomSheet
>
_dismissedBottomSheets
=
<
_StandardBottomSheet
>[];
PersistentBottomSheetController
<
dynamic
>?
_currentBottomSheet
;
GlobalKey
_currentBottomSheetKey
=
GlobalKey
();
final
GlobalKey
_currentBottomSheetKey
=
GlobalKey
();
void
_maybeBuildPersistentBottomSheet
()
{
if
(
widget
.
bottomSheet
!=
null
&&
_currentBottomSheet
==
null
)
{
...
...
@@ -2443,14 +2443,8 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
return
false
;
}
// It is possible that the fade-out animation of the sheet has not finished
// yet, and the key needs to be regenerated at this time, otherwise, there will
// be an exception of duplicate GlobalKey.
if
(
_currentBottomSheetKey
.
currentState
!=
null
)
_currentBottomSheetKey
=
GlobalKey
();
_currentBottomSheet
=
_buildBottomSheet
<
void
>(
(
BuildContext
context
)
{
assert
(
_currentBottomSheetKey
.
currentState
==
null
);
return
NotificationListener
<
DraggableScrollableNotification
>(
onNotification:
_persistentBottomSheetExtentChanged
,
child:
DraggableScrollableActuator
(
...
...
packages/flutter/test/material/persistent_bottom_sheet_test.dart
View file @
14f00790
...
...
@@ -501,23 +501,6 @@ void main() {
},
);
// Regression test for https://github.com/flutter/flutter/issues/83668
testWidgets
(
'Scaffold.bottomSheet update test'
,
(
WidgetTester
tester
)
async
{
Widget
buildFrame
(
Widget
?
bottomSheet
)
{
return
MaterialApp
(
home:
Scaffold
(
body:
const
Placeholder
(),
bottomSheet:
bottomSheet
,
),
);
}
await
tester
.
pumpWidget
(
buildFrame
(
const
Text
(
'I love Flutter!'
)));
await
tester
.
pumpWidget
(
buildFrame
(
null
));
// The disappearing animation has not yet been completed.
await
tester
.
pumpWidget
(
buildFrame
(
const
Text
(
'I love Flutter!'
)));
});
testWidgets
(
'Verify that visual properties are passed through'
,
(
WidgetTester
tester
)
async
{
final
GlobalKey
<
ScaffoldState
>
scaffoldKey
=
GlobalKey
<
ScaffoldState
>();
const
Color
color
=
Colors
.
pink
;
...
...
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