Gireesh
Gireesh

Reputation: 181

Flutter - How to implement search bar

I want to implement search feature in flutter. When a person clicks on search bar in the home page it should take him to the actual search page. In that case, what widget should I use in the home page? A container having icon and textbutton (on clicking, it will take us to actual search page) ? Can someone help?

Upvotes: 0

Views: 296

Answers (1)

Yeah, a container with an icon and text button should be fine. You can navigate the user to the search page on click go the container.

InkWell(
  onTap: () {
    Navigator.of(context).push(MaterialPageRoute(
       builder: (context) {
         return SearchPage();
       }
    ))
  },
)

This is should do.

Upvotes: 0

Related Questions