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
8473da22
Unverified
Commit
8473da22
authored
Nov 30, 2022
by
Taha Tesser
Committed by
GitHub
Nov 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix `Slider` semantic node size (#115285)
parent
333397a0
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
233 additions
and
504 deletions
+233
-504
slider.dart
packages/flutter/lib/src/material/slider.dart
+75
-57
slider_test.dart
packages/flutter/test/material/slider_test.dart
+153
-442
semantics_debugger_test.dart
packages/flutter/test/widgets/semantics_debugger_test.dart
+2
-2
controller_test.dart
packages/flutter_test/test/controller_test.dart
+3
-3
No files found.
packages/flutter/lib/src/material/slider.dart
View file @
8473da22
This diff is collapsed.
Click to expand it.
packages/flutter/test/material/slider_test.dart
View file @
8473da22
This diff is collapsed.
Click to expand it.
packages/flutter/test/widgets/semantics_debugger_test.dart
View file @
8473da22
...
...
@@ -290,7 +290,7 @@ void main() {
});
testWidgets
(
'SemanticsDebugger slider'
,
(
WidgetTester
tester
)
async
{
double
value
=
0.
75
;
double
value
=
0.
50
;
await
tester
.
pumpWidget
(
Directionality
(
...
...
@@ -322,7 +322,7 @@ void main() {
// interpreted as a gesture by the semantics debugger and sent to the widget
// as a semantic action that always moves by 10% of the complete track.
await
tester
.
fling
(
find
.
byType
(
Slider
),
const
Offset
(-
100.0
,
0.0
),
2000.0
,
warnIfMissed:
false
);
// hitting the debugger
expect
(
value
,
equals
(
0.
70
));
expect
(
value
,
equals
(
0.
45
));
});
testWidgets
(
'SemanticsDebugger checkbox'
,
(
WidgetTester
tester
)
async
{
...
...
packages/flutter_test/test/controller_test.dart
View file @
8473da22
...
...
@@ -865,7 +865,7 @@ void main() {
await
tester
.
pumpWidget
(
const
MaterialApp
(
home:
_SemanticsTestWidget
()));
// We're expecting the traversal to start where the slider is.
final
List
<
Matcher
>
expectedMatchers
=
<
Matcher
>[...
fullTraversalMatchers
]..
removeRange
(
0
,
8
);
final
List
<
Matcher
>
expectedMatchers
=
<
Matcher
>[...
fullTraversalMatchers
]..
removeRange
(
0
,
7
);
expect
(
tester
.
semantics
.
simulatedAccessibilityTraversal
(
start:
find
.
byType
(
Slider
)),
...
...
@@ -887,7 +887,7 @@ void main() {
await
tester
.
pumpWidget
(
const
MaterialApp
(
home:
_SemanticsTestWidget
()));
// We're expecting the traversal to end where the slider is, inclusive.
final
Iterable
<
Matcher
>
expectedMatchers
=
<
Matcher
>[...
fullTraversalMatchers
].
getRange
(
0
,
9
);
final
Iterable
<
Matcher
>
expectedMatchers
=
<
Matcher
>[...
fullTraversalMatchers
].
getRange
(
0
,
8
);
expect
(
tester
.
semantics
.
simulatedAccessibilityTraversal
(
end:
find
.
byType
(
Slider
)),
...
...
@@ -909,7 +909,7 @@ void main() {
await
tester
.
pumpWidget
(
const
MaterialApp
(
home:
_SemanticsTestWidget
()));
// We're expecting the traversal to start at the text field and end at the slider.
final
Iterable
<
Matcher
>
expectedMatchers
=
<
Matcher
>[...
fullTraversalMatchers
].
getRange
(
1
,
9
);
final
Iterable
<
Matcher
>
expectedMatchers
=
<
Matcher
>[...
fullTraversalMatchers
].
getRange
(
1
,
8
);
expect
(
tester
.
semantics
.
simulatedAccessibilityTraversal
(
...
...
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