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
1427fef8
Unverified
Commit
1427fef8
authored
Jun 14, 2019
by
Dan Field
Committed by
GitHub
Jun 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make sure fab semantics end up on top (#34512)
parent
8f75d537
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
6 deletions
+20
-6
floating_action_button.dart
...ages/flutter/lib/src/material/floating_action_button.dart
+4
-6
floating_action_button_test.dart
...es/flutter/test/material/floating_action_button_test.dart
+16
-0
No files found.
packages/flutter/lib/src/material/floating_action_button.dart
View file @
1427fef8
...
...
@@ -462,11 +462,9 @@ class FloatingActionButton extends StatelessWidget {
);
if
(
tooltip
!=
null
)
{
result
=
MergeSemantics
(
child:
Tooltip
(
message:
tooltip
,
child:
result
,
),
result
=
Tooltip
(
message:
tooltip
,
child:
result
,
);
}
...
...
@@ -477,7 +475,7 @@ class FloatingActionButton extends StatelessWidget {
);
}
return
result
;
return
MergeSemantics
(
child:
result
)
;
}
@override
...
...
packages/flutter/test/material/floating_action_button_test.dart
View file @
1427fef8
...
...
@@ -763,6 +763,22 @@ void main() {
paintsExactlyCountTimes
(
#clipPath
,
0
),
);
});
testWidgets
(
'Can find FloatingActionButton semantics'
,
(
WidgetTester
tester
)
async
{
await
tester
.
pumpWidget
(
MaterialApp
(
home:
FloatingActionButton
(
onPressed:
()
{}),
));
expect
(
tester
.
getSemantics
(
find
.
byType
(
FloatingActionButton
)),
matchesSemantics
(
hasTapAction:
true
,
hasEnabledState:
true
,
isButton:
true
,
isEnabled:
true
,
),
);
},
semanticsEnabled:
true
);
}
Offset
_rightEdgeOfFab
(
WidgetTester
tester
)
{
...
...
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