Commit 3aa0437f authored by Hixie's avatar Hixie

Rename defaultFocus to initialFocus.

parent 4da27671
...@@ -112,7 +112,7 @@ class AddressBookApp extends App { ...@@ -112,7 +112,7 @@ class AddressBookApp extends App {
child: new TaskDescription( child: new TaskDescription(
label: 'Address Book', label: 'Address Book',
child: new Focus( child: new Focus(
defaultFocus: nameKey, initialFocus: nameKey,
child: buildMain() child: buildMain()
) )
) )
......
...@@ -322,7 +322,7 @@ class StockHome extends StatefulComponent { ...@@ -322,7 +322,7 @@ class StockHome extends StatefulComponent {
]; ];
addMenuToOverlays(overlays); addMenuToOverlays(overlays);
return new Focus( return new Focus(
defaultFocus: searchFieldKey, initialFocus: searchFieldKey,
child: new Stack(overlays) child: new Stack(overlays)
); );
} }
......
...@@ -14,17 +14,17 @@ class Focus extends Inherited { ...@@ -14,17 +14,17 @@ class Focus extends Inherited {
Focus({ Focus({
GlobalKey key, GlobalKey key,
GlobalKey defaultFocus, GlobalKey initialFocus,
Widget child Widget child
}) : super(key: key, child: child); }) : super(key: key, child: child);
GlobalKey defaultFocus; GlobalKey initialFocus;
GlobalKey _currentlyFocusedKey; GlobalKey _currentlyFocusedKey;
GlobalKey get currentlyFocusedKey { GlobalKey get currentlyFocusedKey {
if (_currentlyFocusedKey != null) if (_currentlyFocusedKey != null)
return _currentlyFocusedKey; return _currentlyFocusedKey;
return defaultFocus; return initialFocus;
} }
void set currentlyFocusedKey(GlobalKey value) { void set currentlyFocusedKey(GlobalKey value) {
if (value != _currentlyFocusedKey) { if (value != _currentlyFocusedKey) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment