This will create an AppBar with a search button as its only action, and on press the AppBar will turn white and have a TextField inside, allowing user input. Once the user has input something and pressed the "enter" button on their keyboard, it will close and the value will be printed to the debugger.
Using SearchBar
Essentially, this class returns two different app bars based on whether search is active.
The setState callback you pass the search bar can technically be any VoidCallback.
Features and bugs
Please file feature requests and bugs at the issue tracker.
We've recently added support for null-safety in 3.0.0 -- if you find any issues, please
report them there!