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
d717be94
Commit
d717be94
authored
Sep 25, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add findRenderObject to BuildContext
parent
ee458328
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
0 deletions
+6
-0
framework.dart
packages/flutter/lib/src/fn3/framework.dart
+6
-0
No files found.
packages/flutter/lib/src/fn3/framework.dart
View file @
d717be94
...
...
@@ -291,6 +291,9 @@ abstract class State<T extends StatefulComponent> {
/// Pointer to the owner Element object
StatefulComponentElement
_element
;
/// The context in which this object will be built
BuildContext
get
context
=>
_element
;
/// Called when this object is inserted into the tree. Override this function
/// to perform initialization that depends on the location at which this
/// object was inserted into the tree or on the widget configuration object.
...
...
@@ -392,6 +395,7 @@ typedef void ElementVisitor(Element element);
abstract
class
BuildContext
{
InheritedWidget
inheritedWidgetOfType
(
Type
targetType
);
RenderObject
findRenderObject
();
}
/// Elements are the instantiations of Widget configurations.
...
...
@@ -601,6 +605,8 @@ abstract class Element<T extends Widget> implements BuildContext {
return
ancestor
?.
widget
;
}
RenderObject
findRenderObject
()
=>
renderObject
;
void
dependenciesChanged
()
{
assert
(
false
);
}
...
...
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