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
d4b871e1
Unverified
Commit
d4b871e1
authored
Nov 20, 2020
by
Ian Hickson
Committed by
GitHub
Nov 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Minor documentation fixes (#70501)
parent
613a9598
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
9 deletions
+23
-9
viewport.dart
packages/flutter/lib/src/rendering/viewport.dart
+5
-0
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+18
-9
No files found.
packages/flutter/lib/src/rendering/viewport.dart
View file @
d4b871e1
...
@@ -53,6 +53,11 @@ abstract class RenderAbstractViewport extends RenderObject {
...
@@ -53,6 +53,11 @@ abstract class RenderAbstractViewport extends RenderObject {
/// Returns the offset that would be needed to reveal the `target`
/// Returns the offset that would be needed to reveal the `target`
/// [RenderObject].
/// [RenderObject].
///
///
/// This is used by [RenderViewportBase.showInViewport], which is
/// itself used by [RenderObject.showOnScreen] for
/// [RenderViewportBase], which is in turn used by the semantics
/// system to implement scrolling for accessibility tools.
///
/// The optional `rect` parameter describes which area of that `target` object
/// The optional `rect` parameter describes which area of that `target` object
/// should be revealed in the viewport. If `rect` is null, the entire
/// should be revealed in the viewport. If `rect` is null, the entire
/// `target` [RenderObject] (as defined by its [RenderObject.paintBounds])
/// `target` [RenderObject] (as defined by its [RenderObject.paintBounds])
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
d4b871e1
...
@@ -3326,6 +3326,15 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
...
@@ -3326,6 +3326,15 @@ abstract class Element extends DiagnosticableTree implements BuildContext {
/// | :-----------------: | :--------------------- | :---------------------- |
/// | :-----------------: | :--------------------- | :---------------------- |
/// | **child == null** | Returns null. | Returns new [Element]. |
/// | **child == null** | Returns null. | Returns new [Element]. |
/// | **child != null** | Old child is removed, returns null. | Old child updated if possible, returns child or new [Element]. |
/// | **child != null** | Old child is removed, returns null. | Old child updated if possible, returns child or new [Element]. |
///
/// The `newSlot` argument is used only if `newWidget` is not null. If `child`
/// is null (or if the old child cannot be updated), then the `newSlot` is
/// given to the new [Element] that is created for the child, via
/// [inflateWidget]. If `child` is not null (and the old child _can_ be
/// updated), then the `newSlot` is given to [updateSlotForChild] to update
/// its slot, in case it has moved around since it was last built.
///
/// See the [RenderObjectElement] documentation for more information on slots.
@protected
@protected
Element
?
updateChild
(
Element
?
child
,
Widget
?
newWidget
,
dynamic
newSlot
)
{
Element
?
updateChild
(
Element
?
child
,
Widget
?
newWidget
,
dynamic
newSlot
)
{
if
(
newWidget
==
null
)
{
if
(
newWidget
==
null
)
{
...
@@ -5336,10 +5345,10 @@ class InheritedElement extends ProxyElement {
...
@@ -5336,10 +5345,10 @@ class InheritedElement extends ProxyElement {
/// class FooElement extends RenderObjectElement {
/// class FooElement extends RenderObjectElement {
///
///
/// @override
/// @override
/// Foo get widget => super.widget;
/// Foo get widget => super.widget
as Foo
;
///
///
/// @override
/// @override
/// RenderFoo get renderObject => super.renderObject;
/// RenderFoo get renderObject => super.renderObject
as RenderFoo
;
///
///
/// // ...
/// // ...
/// }
/// }
...
@@ -5397,13 +5406,13 @@ class InheritedElement extends ProxyElement {
...
@@ -5397,13 +5406,13 @@ class InheritedElement extends ProxyElement {
///
///
/// #### Dynamically determining the children during layout
/// #### Dynamically determining the children during layout
///
///
/// If the widgets are to be generated at layout time, then generating them
whe
n
/// If the widgets are to be generated at layout time, then generating them
i
n
/// the [
update] method won't work: layout of this element's render object
/// the [
mount] and [update] methods won't work: layout of this element's render
///
hasn't started yet at that point. Instead, the [update] method can mark the
///
object hasn't started yet at that point. Instead, the [update] method can
///
render object as needing layout (see [RenderObject.markNeedsLayout]), and
///
mark the render object as needing layout (see
///
then the render object's [RenderObject.performLayout] method can call back
///
[RenderObject.markNeedsLayout]), and then the render object's
///
to the element to have it generate the widgets and call [updateChild]
///
[RenderObject.performLayout] method can call back to the element to have it
/// accordingly.
///
generate the widgets and call [updateChild]
accordingly.
///
///
/// For a render object to call an element during layout, it must use
/// For a render object to call an element during layout, it must use
/// [RenderObject.invokeLayoutCallback]. For an element to call [updateChild]
/// [RenderObject.invokeLayoutCallback]. For an element to call [updateChild]
...
...
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