Created
January 9, 2019 01:56
-
-
Save lawreyios/7c002c04df730bbb85cb0da1c5373c52 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void _searchPressed() { | |
setState(() { | |
if (this._searchIcon.icon == Icons.search) { | |
this._searchIcon = new Icon(Icons.close); | |
this._appBarTitle = new TextField( | |
controller: _filter, | |
style: new TextStyle(color: Colors.white), | |
decoration: new InputDecoration( | |
prefixIcon: new Icon(Icons.search, color: Colors.white), | |
fillColor: Colors.white, | |
hintText: 'Search by name', | |
hintStyle: TextStyle(color: Colors.white), | |
), | |
); | |
} else { | |
this._searchIcon = new Icon(Icons.search); | |
this._appBarTitle = new Text(appTitle); | |
_filter.clear(); | |
} | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment