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 {
/// Returns the offset that would be needed to reveal the `target`
/// [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
/// should be revealed in the viewport. If `rect` is null, the entire
/// `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 {
/// | :-----------------: | :--------------------- | :---------------------- |
/// | **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]. |
///
/// 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
Element
?
updateChild
(
Element
?
child
,
Widget
?
newWidget
,
dynamic
newSlot
)
{
if
(
newWidget
==
null
)
{
...
...
@@ -5336,10 +5345,10 @@ class InheritedElement extends ProxyElement {
/// class FooElement extends RenderObjectElement {
///
/// @override
/// Foo get widget => super.widget;
/// Foo get widget => super.widget
as Foo
;
///
/// @override
/// RenderFoo get renderObject => super.renderObject;
/// RenderFoo get renderObject => super.renderObject
as RenderFoo
;
///
/// // ...
/// }
...
...
@@ -5397,13 +5406,13 @@ class InheritedElement extends ProxyElement {
///
/// #### Dynamically determining the children during layout
///
/// If the widgets are to be generated at layout time, then generating them
whe
n
/// the [
update] method won't work: layout of this element's render object
///
hasn't started yet at that point. Instead, the [update] method can mark the
///
render object as needing layout (see [RenderObject.markNeedsLayout]), and
///
then the render object's [RenderObject.performLayout] method can call back
///
to the element to have it generate the widgets and call [updateChild]
/// accordingly.
/// If the widgets are to be generated at layout time, then generating them
i
n
/// the [
mount] and [update] methods won't work: layout of this element's render
///
object hasn't started yet at that point. Instead, the [update] method can
///
mark the render object as needing layout (see
///
[RenderObject.markNeedsLayout]), and then the render object's
///
[RenderObject.performLayout] method can call back to the element to have it
///
generate the widgets and call [updateChild]
accordingly.
///
/// For a render object to call an element during layout, it must use
/// [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