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
e300c1a4
Unverified
Commit
e300c1a4
authored
Feb 06, 2020
by
creativecreatorormaybenot
Committed by
GitHub
Feb 06, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs: provide Guidance for SingleChildRenderObjectWidget implementations (#49993)
parent
3e1a124e
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
2 deletions
+11
-2
object.dart
packages/flutter/lib/src/rendering/object.dart
+5
-1
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+6
-1
No files found.
packages/flutter/lib/src/rendering/object.dart
View file @
e300c1a4
...
...
@@ -2897,7 +2897,11 @@ abstract class RenderObject extends AbstractNode with DiagnosticableTreeMixin im
/// Generic mixin for render objects with one child.
///
/// Provides a child model for a render object subclass that has a unique child.
/// Provides a child model for a render object subclass that has
/// a unique child, which is accessible via the [child] getter.
///
/// This mixin is typically used to implement render objects created
/// in a [SingleChildRenderObjectWidget].
mixin
RenderObjectWithChildMixin
<
ChildType
extends
RenderObject
>
on
RenderObject
{
/// Checks whether the given render object has the correct [runtimeType] to be
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
e300c1a4
...
...
@@ -1782,9 +1782,14 @@ abstract class LeafRenderObjectWidget extends RenderObjectWidget {
LeafRenderObjectElement
createElement
()
=>
LeafRenderObjectElement
(
this
);
}
/// A superclass for
RenderObjectWidgets that configure RenderObject
subclasses
/// A superclass for
[RenderObjectWidget]s that configure [RenderObject]
subclasses
/// that have a single child slot. (This superclass only provides the storage
/// for that child, it doesn't actually provide the updating logic.)
///
/// Typically, the render object assigned to this widget will make use of
/// [RenderObjectWithChildMixin] to implement a single-child model. The mixin
/// exposes a [RenderObjectWithChildMixin.child] property that allows
/// retrieving the render object belonging to the [child] widget.
abstract
class
SingleChildRenderObjectWidget
extends
RenderObjectWidget
{
/// Abstract const constructor. This constructor enables subclasses to provide
/// const constructors so that they can be used in const expressions.
...
...
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