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
4c9f15cc
Commit
4c9f15cc
authored
Oct 23, 2015
by
Hixie
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rev the Dart SDK to pick up better dartdocs
parent
6d4221cb
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
5 deletions
+7
-5
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+6
-4
pubspec.yaml
packages/flutter/pubspec.yaml
+1
-1
No files found.
packages/flutter/lib/src/widgets/framework.dart
View file @
4c9f15cc
...
...
@@ -70,7 +70,7 @@ typedef void GlobalKeyRemoveListener(GlobalKey key);
/// A GlobalKey is one that must be unique across the entire application. It is
/// used by components that need to communicate with other components across the
/// application's element tree.
abstract
class
GlobalKey
<
T
extends
State
>
extends
Key
{
abstract
class
GlobalKey
<
T
extends
State
<
StatefulComponent
>
>
extends
Key
{
const
GlobalKey
.
constructor
()
:
super
.
constructor
();
// so that subclasses can call us, since the Key() factory constructor shadows the implicit constructor
/// Constructs a LabeledGlobalKey, which is a GlobalKey with a label used for debugging.
...
...
@@ -118,8 +118,10 @@ abstract class GlobalKey<T extends State> extends Key {
Widget
get
currentWidget
=>
_currentElement
?.
widget
;
T
get
currentState
{
Element
element
=
_currentElement
;
if
(
element
is
StatefulComponentElement
<
dynamic
,
T
>)
return
element
.
state
;
if
(
element
is
StatefulComponentElement
<
StatefulComponent
,
T
>)
{
StatefulComponentElement
<
StatefulComponent
,
T
>
statefulElement
=
element
;
return
statefulElement
.
state
;
}
return
null
;
}
...
...
@@ -172,7 +174,7 @@ abstract class GlobalKey<T extends State> extends Key {
/// Each LabeledGlobalKey instance is a unique key.
/// The optional label can be used for documentary purposes. It does not affect
/// the key's identity.
class
LabeledGlobalKey
<
T
extends
State
>
extends
GlobalKey
<
T
>
{
class
LabeledGlobalKey
<
T
extends
State
<
StatefulComponent
>
>
extends
GlobalKey
<
T
>
{
const
LabeledGlobalKey
(
this
.
_label
)
:
super
.
constructor
();
final
String
_label
;
String
toString
()
=>
'[GlobalKey
${_label != null ? _label : hashCode}
]'
;
...
...
packages/flutter/pubspec.yaml
View file @
4c9f15cc
...
...
@@ -11,7 +11,7 @@ dependencies:
newton
:
'
>=0.1.4
<0.2.0'
sky_engine
:
0.0.43
sky_services
:
0.0.43
sky_tools
:
'
>=0.0.2
5
<0.1.0'
sky_tools
:
'
>=0.0.2
8
<0.1.0'
vector_math
:
'
>=1.4.3
<2.0.0'
environment
:
sdk
:
'
>=1.12.0
<2.0.0'
...
...
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