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
58e57504
Unverified
Commit
58e57504
authored
Jul 12, 2022
by
Michael Goderbauer
Committed by
GitHub
Jul 12, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Persistent BottomSheet are not dismissible via a11y (#107435)
parent
4ef6b817
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
5 deletions
+27
-5
scaffold.dart
packages/flutter/lib/src/material/scaffold.dart
+5
-5
scaffold_test.dart
packages/flutter/test/material/scaffold_test.dart
+22
-0
No files found.
packages/flutter/lib/src/material/scaffold.dart
View file @
58e57504
...
...
@@ -2182,7 +2182,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
),
);
},
true
,
isPersistent:
true
,
animationController:
animationController
,
);
}
...
...
@@ -2225,8 +2225,8 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
}
PersistentBottomSheetController
<
T
>
_buildBottomSheet
<
T
>(
WidgetBuilder
builder
,
bool
isPersistent
,
{
WidgetBuilder
builder
,
{
required
bool
isPersistent
,
required
AnimationController
animationController
,
Color
?
backgroundColor
,
double
?
elevation
,
...
...
@@ -2412,7 +2412,7 @@ class ScaffoldState extends State<Scaffold> with TickerProviderStateMixin, Resto
setState
(()
{
_currentBottomSheet
=
_buildBottomSheet
<
T
>(
builder
,
false
,
isPersistent:
false
,
animationController:
controller
,
backgroundColor:
backgroundColor
,
elevation:
elevation
,
...
...
@@ -3165,7 +3165,7 @@ class _StandardBottomSheetState extends State<_StandardBottomSheet> {
},
child:
Semantics
(
container:
true
,
onDismiss:
close
,
onDismiss:
!
widget
.
isPersistent
?
close
:
null
,
child:
NotificationListener
<
DraggableScrollableNotification
>(
onNotification:
extentChanged
,
child:
BottomSheet
(
...
...
packages/flutter/test/material/scaffold_test.dart
View file @
58e57504
...
...
@@ -2599,6 +2599,28 @@ void main() {
final
ErrorSummary
summary
=
error
.
diagnostics
.
first
as
ErrorSummary
;
expect
(
summary
.
toString
(),
'The showSnackBar() method cannot be called during build.'
);
});
testWidgets
(
'Persistent BottomSheet is not dismissible via a11y means'
,
(
WidgetTester
tester
)
async
{
final
Key
bottomSheetKey
=
UniqueKey
();
await
tester
.
pumpWidget
(
MaterialApp
(
home:
Scaffold
(
bottomSheet:
Container
(
key:
bottomSheetKey
,
height:
44
,
color:
Colors
.
blue
,
child:
const
Text
(
'BottomSheet'
),
),
),
));
expect
(
tester
.
getSemantics
(
find
.
byKey
(
bottomSheetKey
)),
// Having the redundant argument value makes the intent of the test clear.
// ignore: avoid_redundant_argument_values
matchesSemantics
(
label:
'BottomSheet'
,
hasDismissAction:
false
),
);
});
}
class
_GeometryListener
extends
StatefulWidget
{
...
...
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