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
1f737f5c
Commit
1f737f5c
authored
Nov 10, 2016
by
Ian Hickson
Committed by
GitHub
Nov 10, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add a table to the `updateChild` docs (#6782)
parent
cffd5517
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+8
-4
No files found.
packages/flutter/lib/src/widgets/framework.dart
View file @
1f737f5c
...
...
@@ -2019,10 +2019,8 @@ abstract class Element implements BuildContext {
/// Update the given child with the given new configuration.
///
/// This method is the core of the widgets system.
///
/// It is called each time we are to add, update, or remove a child based on
/// an updated configuration.
/// This method is the core of the widgets system. It is called each time we
/// are to add, update, or remove a child based on an updated configuration.
///
/// If the `child` is null, and the `newWidget` is not null, then we have a new
/// child for which we need to create an [Element], configured with `newWidget`.
...
...
@@ -2042,6 +2040,12 @@ abstract class Element implements BuildContext {
/// The [updateChild] method returns the new child, if it had to create one,
/// or the child that was passed in, if it just had to update the child, or
/// null, if it removed the child and did not replace it.
///
/// The following table summarises the above:
///
/// | | `newWidget == null` | `newWidget != null` |
/// | `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]. |
@protected
Element
updateChild
(
Element
child
,
Widget
newWidget
,
dynamic
newSlot
)
{
if
(
newWidget
==
null
)
{
...
...
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