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
ede1b15b
Unverified
Commit
ede1b15b
authored
Aug 14, 2020
by
Nolan Scobie
Committed by
GitHub
Aug 14, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add viewport documentation breadcrumbs (#63192)
parent
f360d8b8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
41 additions
and
0 deletions
+41
-0
object.dart
packages/flutter/lib/src/rendering/object.dart
+16
-0
viewport.dart
packages/flutter/lib/src/rendering/viewport.dart
+25
-0
No files found.
packages/flutter/lib/src/rendering/object.dart
View file @
ede1b15b
...
...
@@ -2421,6 +2421,11 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
/// semantics tree to implement implicit accessibility scrolling on iOS where
/// the viewport scrolls implicitly when moving the accessibility focus from
/// a the last visible node in the viewport to the first hidden one.
///
/// See also:
///
/// * [RenderViewportBase.cacheExtent], used by viewports to extend their
/// semantics clip beyond their approximate paint clip.
Rect
describeSemanticsClip
(
covariant
RenderObject
child
)
=>
null
;
// SEMANTICS
...
...
@@ -2906,6 +2911,11 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
///
/// The `duration` parameter can be set to a non-zero value to bring the
/// target object on screen in an animation defined by `curve`.
///
/// See also:
///
/// * [RenderViewportBase.showInViewport], which [RenderViewportBase] and
/// [SingleChildScrollView] delegate this method to.
void
showOnScreen
({
RenderObject
descendant
,
Rect
rect
,
...
...
@@ -3805,6 +3815,12 @@ class _SemanticsGeometry {
/// Value for [SemanticsNode.rect].
Rect
get
rect
=>
_rect
;
/// Computes values, ensuring `rect` is properly bounded by ancestor clipping rects.
///
/// See also:
///
/// * [RenderObject.describeSemanticsClip], typically used to determine `parentSemanticsClipRect`.
/// * [RenderObject.describeApproximatePaintClip], typically used to determine `parentPaintClipRect`.
void
_computeValues
(
Rect
parentSemanticsClipRect
,
Rect
parentPaintClipRect
,
List
<
RenderObject
>
ancestors
)
{
assert
(
ancestors
.
length
>
1
);
...
...
packages/flutter/lib/src/rendering/viewport.dart
View file @
ede1b15b
...
...
@@ -188,6 +188,21 @@ abstract class RenderViewportBase<ParentDataClass extends ContainerParentDataMix
_cacheExtentStyle
=
cacheExtentStyle
,
_clipBehavior
=
clipBehavior
;
/// Report the semantics of this node, for example for accessibility purposes.
///
/// [RenderViewportBase] adds [RenderViewport.useTwoPaneSemantics] to the
/// provided [SemanticsConfiguration] to support children using
/// [RenderViewport.excludeFromScrolling].
///
/// This method should be overridden by subclasses that have interesting
/// semantic information. Overriding subclasses should call
/// `super.describeSemanticsConfiguration(config)` to ensure
/// [RenderViewport.useTwoPaneSemantics] is still added to `config`.
///
/// See also:
///
/// * [RenderObject.describeSemanticsConfiguration], for important
/// details about not mutating a [SemanticsConfiguration] out of context.
@override
void
describeSemanticsConfiguration
(
SemanticsConfiguration
config
)
{
super
.
describeSemanticsConfiguration
(
config
);
...
...
@@ -1040,6 +1055,11 @@ abstract class RenderViewportBase<ParentDataClass extends ContainerParentDataMix
///
/// The `duration` parameter can be set to a non-zero value to animate the
/// target object into the viewport with an animation defined by `curve`.
///
/// See also:
///
/// * [RenderObject.showOnScreen], overridden by [RenderViewportBase] and the
/// renderer for [SingleChildScrollView] to delegate to this method.
static
Rect
showInViewport
({
RenderObject
descendant
,
Rect
rect
,
...
...
@@ -1188,6 +1208,11 @@ class RenderViewport extends RenderViewportBase<SliverPhysicalContainerParentDat
/// The semantic scrolling actions and the [SemanticsNode]s of scrollable
/// children will be attached to the inner node, which itself is a child of
/// the outer node.
///
/// See also:
///
/// * [RenderViewportBase.describeSemanticsConfiguration], which adds this
/// tag to its [SemanticsConfiguration].
static
const
SemanticsTag
useTwoPaneSemantics
=
SemanticsTag
(
'RenderViewport.twoPane'
);
/// When a top-level [SemanticsNode] below a [RenderAbstractViewport] is
...
...
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