Don’t require global keys for Input, fixes #1828

This commit is contained in:
Collin Jackson
2016-02-12 16:56:10 -08:00
parent 62fb32d458
commit d4533622e1
2 changed files with 7 additions and 11 deletions

View File

@@ -241,9 +241,6 @@ class StockHomeState extends State<StockHome> {
static const List<String> portfolioSymbols = const <String>["AAPL","FIZZ", "FIVE", "FLAT", "ZINC", "ZNGA"];
static GlobalKey searchFieldKey = new GlobalKey();
static GlobalKey companyNameKey = new GlobalKey();
// TODO(abarth): Should we factor this into a SearchBar in the framework?
Widget buildSearchBar() {
return new ToolBar(
@@ -255,7 +252,6 @@ class StockHomeState extends State<StockHome> {
),
center: new Input(
value: _searchQuery,
key: searchFieldKey,
autofocus: true,
hintText: 'Search stocks',
onChanged: _handleSearchQueryChanged
@@ -272,7 +268,6 @@ class StockHomeState extends State<StockHome> {
return new Column(
children: <Widget>[
new Input(
key: companyNameKey,
autofocus: true,
hintText: 'Company Name'
),