Rename defaultFocus to initialFocus.
This commit is contained in:
@@ -112,7 +112,7 @@ class AddressBookApp extends App {
|
||||
child: new TaskDescription(
|
||||
label: 'Address Book',
|
||||
child: new Focus(
|
||||
defaultFocus: nameKey,
|
||||
initialFocus: nameKey,
|
||||
child: buildMain()
|
||||
)
|
||||
)
|
||||
|
||||
@@ -322,7 +322,7 @@ class StockHome extends StatefulComponent {
|
||||
];
|
||||
addMenuToOverlays(overlays);
|
||||
return new Focus(
|
||||
defaultFocus: searchFieldKey,
|
||||
initialFocus: searchFieldKey,
|
||||
child: new Stack(overlays)
|
||||
);
|
||||
}
|
||||
|
||||
@@ -14,17 +14,17 @@ class Focus extends Inherited {
|
||||
|
||||
Focus({
|
||||
GlobalKey key,
|
||||
GlobalKey defaultFocus,
|
||||
GlobalKey initialFocus,
|
||||
Widget child
|
||||
}) : super(key: key, child: child);
|
||||
|
||||
GlobalKey defaultFocus;
|
||||
GlobalKey initialFocus;
|
||||
|
||||
GlobalKey _currentlyFocusedKey;
|
||||
GlobalKey get currentlyFocusedKey {
|
||||
if (_currentlyFocusedKey != null)
|
||||
return _currentlyFocusedKey;
|
||||
return defaultFocus;
|
||||
return initialFocus;
|
||||
}
|
||||
void set currentlyFocusedKey(GlobalKey value) {
|
||||
if (value != _currentlyFocusedKey) {
|
||||
|
||||
Reference in New Issue
Block a user