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
d693d2b9
Unverified
Commit
d693d2b9
authored
Sep 29, 2020
by
Alexander Brusher
Committed by
GitHub
Sep 29, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Adds getter/setter for slider semantics flag. (#65766)
parent
b742816d
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
0 deletions
+35
-0
proxy_box.dart
packages/flutter/lib/src/rendering/proxy_box.dart
+15
-0
semantics.dart
packages/flutter/lib/src/semantics/semantics.dart
+13
-0
basic.dart
packages/flutter/lib/src/widgets/basic.dart
+4
-0
custom_painter_test.dart
packages/flutter/test/widgets/custom_painter_test.dart
+2
-0
semantics_test.dart
packages/flutter/test/widgets/semantics_test.dart
+1
-0
No files found.
packages/flutter/lib/src/rendering/proxy_box.dart
View file @
d693d2b9
...
...
@@ -3565,6 +3565,7 @@ class RenderSemanticsAnnotations extends RenderProxyBox {
bool
?
toggled
,
bool
?
selected
,
bool
?
button
,
bool
?
slider
,
bool
?
link
,
bool
?
header
,
bool
?
textField
,
...
...
@@ -3618,6 +3619,7 @@ class RenderSemanticsAnnotations extends RenderProxyBox {
_toggled
=
toggled
,
_selected
=
selected
,
_button
=
button
,
_slider
=
slider
,
_link
=
link
,
_header
=
header
,
_textField
=
textField
,
...
...
@@ -3764,6 +3766,17 @@ class RenderSemanticsAnnotations extends RenderProxyBox {
markNeedsSemanticsUpdate
();
}
/// If non-null, sets the [SemanticsConfiguration.isSlider] semantic to the
/// given value.
bool
?
get
slider
=>
_slider
;
bool
?
_slider
;
set
slider
(
bool
?
value
)
{
if
(
slider
==
value
)
return
;
_slider
=
value
;
markNeedsSemanticsUpdate
();
}
/// If non-null, sets the [SemanticsConfiguration.isLink] semantic to the
/// given value.
bool
?
get
link
=>
_link
;
...
...
@@ -4477,6 +4490,8 @@ class RenderSemanticsAnnotations extends RenderProxyBox {
config
.
isButton
=
button
!;
if
(
link
!=
null
)
config
.
isLink
=
link
!;
if
(
slider
!=
null
)
config
.
isSlider
=
slider
!;
if
(
header
!=
null
)
config
.
isHeader
=
header
!;
if
(
textField
!=
null
)
...
...
packages/flutter/lib/src/semantics/semantics.dart
View file @
d693d2b9
...
...
@@ -596,6 +596,7 @@ class SemanticsProperties extends DiagnosticableTree {
this
.
link
,
this
.
header
,
this
.
textField
,
this
.
slider
,
this
.
readOnly
,
this
.
focusable
,
this
.
focused
,
...
...
@@ -694,6 +695,12 @@ class SemanticsProperties extends DiagnosticableTree {
/// text field.
final
bool
?
textField
;
/// If non-null, indicates that this subtree represents a slider.
///
/// Talkback/\VoiceOver provides users with the hint "slider" when a
/// slider is focused.
final
bool
?
slider
;
/// If non-null, indicates that this subtree is read only.
///
/// Only applicable when [textField] is true.
...
...
@@ -3640,6 +3647,12 @@ class SemanticsConfiguration {
_setFlag
(
SemanticsFlag
.
isHeader
,
value
);
}
/// Whether the owning [RenderObject] is a slider (true) or not (false).
bool
get
isSlider
=>
_hasFlag
(
SemanticsFlag
.
isSlider
);
set
isSlider
(
bool
value
)
{
_setFlag
(
SemanticsFlag
.
isSlider
,
value
);
}
/// Whether the owning [RenderObject] is considered hidden.
///
/// Hidden elements are currently not visible on screen. They may be covered
...
...
packages/flutter/lib/src/widgets/basic.dart
View file @
d693d2b9
...
...
@@ -6662,6 +6662,7 @@ class Semantics extends SingleChildRenderObjectWidget {
bool
?
selected
,
bool
?
toggled
,
bool
?
button
,
bool
?
slider
,
bool
?
link
,
bool
?
header
,
bool
?
textField
,
...
...
@@ -6717,6 +6718,7 @@ class Semantics extends SingleChildRenderObjectWidget {
toggled:
toggled
,
selected:
selected
,
button:
button
,
slider:
slider
,
link:
link
,
header:
header
,
textField:
textField
,
...
...
@@ -6831,6 +6833,7 @@ class Semantics extends SingleChildRenderObjectWidget {
toggled:
properties
.
toggled
,
selected:
properties
.
selected
,
button:
properties
.
button
,
slider:
properties
.
slider
,
link:
properties
.
link
,
header:
properties
.
header
,
textField:
properties
.
textField
,
...
...
@@ -6902,6 +6905,7 @@ class Semantics extends SingleChildRenderObjectWidget {
..
toggled
=
properties
.
toggled
..
selected
=
properties
.
selected
..
button
=
properties
.
button
..
slider
=
properties
.
slider
..
link
=
properties
.
link
..
header
=
properties
.
header
..
textField
=
properties
.
textField
...
...
packages/flutter/test/widgets/custom_painter_test.dart
View file @
d693d2b9
...
...
@@ -414,6 +414,7 @@ void _defineTests() {
selected:
true
,
hidden:
true
,
button:
true
,
slider:
true
,
link:
true
,
textField:
true
,
readOnly:
true
,
...
...
@@ -464,6 +465,7 @@ void _defineTests() {
selected:
true
,
hidden:
true
,
button:
true
,
slider:
true
,
link:
true
,
textField:
true
,
readOnly:
true
,
...
...
packages/flutter/test/widgets/semantics_test.dart
View file @
d693d2b9
...
...
@@ -475,6 +475,7 @@ void main() {
checked:
true
,
selected:
true
,
button:
true
,
slider:
true
,
link:
true
,
textField:
true
,
readOnly:
true
,
...
...
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