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
6db39fe9
Commit
6db39fe9
authored
Nov 20, 2015
by
Adam Barth
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename LabeledGlobalKey's argument to debugLabel
The old name was confusing. Fixes #462
parent
dc23af9f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
main.dart
examples/address_book/lib/main.dart
+6
-6
dropdown.dart
packages/flutter/lib/src/material/dropdown.dart
+1
-1
framework.dart
packages/flutter/lib/src/widgets/framework.dart
+4
-4
No files found.
examples/address_book/lib/main.dart
View file @
6db39fe9
...
...
@@ -48,12 +48,12 @@ class AddressBookHome extends StatelessComponent {
);
}
static
final
GlobalKey
nameKey
=
new
GlobalKey
(
l
abel:
'name field'
);
static
final
GlobalKey
phoneKey
=
new
GlobalKey
(
l
abel:
'phone field'
);
static
final
GlobalKey
emailKey
=
new
GlobalKey
(
l
abel:
'email field'
);
static
final
GlobalKey
addressKey
=
new
GlobalKey
(
l
abel:
'address field'
);
static
final
GlobalKey
ringtoneKey
=
new
GlobalKey
(
l
abel:
'ringtone field'
);
static
final
GlobalKey
noteKey
=
new
GlobalKey
(
l
abel:
'note field'
);
static
final
GlobalKey
nameKey
=
new
GlobalKey
(
debugL
abel:
'name field'
);
static
final
GlobalKey
phoneKey
=
new
GlobalKey
(
debugL
abel:
'phone field'
);
static
final
GlobalKey
emailKey
=
new
GlobalKey
(
debugL
abel:
'email field'
);
static
final
GlobalKey
addressKey
=
new
GlobalKey
(
debugL
abel:
'address field'
);
static
final
GlobalKey
ringtoneKey
=
new
GlobalKey
(
debugL
abel:
'ringtone field'
);
static
final
GlobalKey
noteKey
=
new
GlobalKey
(
debugL
abel:
'note field'
);
Widget
buildBody
(
BuildContext
context
)
{
return
new
Block
(<
Widget
>[
...
...
packages/flutter/lib/src/material/dropdown.dart
View file @
6db39fe9
...
...
@@ -239,7 +239,7 @@ class DropdownButton<T> extends StatelessComponent {
}
Widget
build
(
BuildContext
context
)
{
GlobalKey
indexedStackKey
=
new
GlobalKey
(
l
abel:
'DropdownButton.IndexedStack'
);
GlobalKey
indexedStackKey
=
new
GlobalKey
(
debugL
abel:
'DropdownButton.IndexedStack'
);
int
selectedIndex
=
0
;
for
(
int
itemIndex
=
0
;
itemIndex
<
items
.
length
;
itemIndex
++)
{
if
(
items
[
itemIndex
].
value
==
value
)
{
...
...
packages/flutter/lib/src/widgets/framework.dart
View file @
6db39fe9
...
...
@@ -75,7 +75,7 @@ abstract class GlobalKey<T extends State<StatefulComponent>> extends Key {
/// Constructs a LabeledGlobalKey, which is a GlobalKey with a label used for debugging.
/// The label is not used for comparing the identity of the key.
factory
GlobalKey
({
String
label
})
=>
new
LabeledGlobalKey
<
T
>(
l
abel
);
// the label is purely for debugging purposes and is otherwise ignored
factory
GlobalKey
({
String
debugLabel
})
=>
new
LabeledGlobalKey
<
T
>(
debugL
abel
);
// the label is purely for debugging purposes and is otherwise ignored
static
final
Map
<
GlobalKey
,
Element
>
_registry
=
new
Map
<
GlobalKey
,
Element
>();
static
final
Map
<
GlobalKey
,
int
>
_debugDuplicates
=
new
Map
<
GlobalKey
,
int
>();
...
...
@@ -175,9 +175,9 @@ abstract class GlobalKey<T extends State<StatefulComponent>> extends Key {
/// The optional label can be used for documentary purposes. It does not affect
/// the key's identity.
class
LabeledGlobalKey
<
T
extends
State
<
StatefulComponent
>>
extends
GlobalKey
<
T
>
{
const
LabeledGlobalKey
(
this
.
_
l
abel
)
:
super
.
constructor
();
final
String
_
l
abel
;
String
toString
()
=>
'[GlobalKey
${_
label != null ? _l
abel : hashCode}
]'
;
const
LabeledGlobalKey
(
this
.
_
debugL
abel
)
:
super
.
constructor
();
final
String
_
debugL
abel
;
String
toString
()
=>
'[GlobalKey
${_
debugLabel != null ? _debugL
abel : hashCode}
]'
;
}
/// A kind of [GlobalKey] that takes its identity from the object used as its value.
...
...
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