Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Scaffold(
- appBar: AppBar(
- title: appBarTitle,
- actions: <Widget>[
- IconButton(
- icon: actionIcon,
- onPressed: () {
- setState(() {
- if (this.actionIcon.icon == Icons.search) {
- this.actionIcon = new Icon(
- Icons.close,
- color: Colors.white,
- );
- appBarTitle = AutoCompleteTextField<AutoCompleteObject>(
- key: key,
- controller: TextEditingController(),
- clearOnSubmit: true,
- suggestions: listName,
- itemBuilder: (context, suggestion) => Padding(
- child: ListTile(
- title: Text(suggestion.name),
- trailing: Text(suggestion.owner),
- ),
- padding: EdgeInsets.all(8.0),
- ),
- itemSubmitted: (item) => setState(() {
- globals.tagStream.sink.add(item.tag);
- controller.halfExpand();
- _handleSearchEnd();
- }),
- focusNode: _focusField,
- itemSorter: (a, b) => 0,
- itemFilter: (suggestion, query) => Filter();
- );
- requestFocus();
- } else {
- _handleSearchEnd();
- }
- });
- },
- ),
- ],
- ),
- drawer: leftMenuConnected
- body: CommunityPage(),
- );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement