Advertisement
AnoTest

SearchBar_1

Mar 7th, 2021
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Dart 0.76 KB | None | 0 0
  1. //Made by Samir
  2.  
  3. IconButton(
  4.             onPressed: () {
  5.               setState(() {
  6.                 if (this.cusIcon.icon == Icons.search) {
  7.                   this.cusIcon = Icon(Icons.cancel);
  8.                   this.cusSearchBar = TextField(
  9.                     textInputAction: TextInputAction.go,
  10.                     decoration: InputDecoration(hintText: "Search "),
  11.                     style: TextStyle(
  12.                       color: Colors.white,
  13.                       fontSize: 16,
  14.                     ),
  15.                   );
  16.                 } else {
  17.                   this.cusIcon = Icon(Icons.search);
  18.                   this.cusSearchBar = Text('AppBar');
  19.                 }
  20.               });
  21.             },
  22.             icon: cusIcon,
  23.           ),
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement