Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save theindianappguy/2ce5dd2afa13f6ef5d7126f732dae8f9 to your computer and use it in GitHub Desktop.

Select an option

Save theindianappguy/2ce5dd2afa13f6ef5d7126f732dae8f9 to your computer and use it in GitHub Desktop.
Search Bar for Wallpaper App FLutter by Sanskar Tiwari (theindianappguy)
Container(
decoration: BoxDecoration(
color: Color(0xfff5f8fd),
borderRadius: BorderRadius.circular(30),
),
margin: EdgeInsets.symmetric(horizontal: 24),
padding: EdgeInsets.symmetric(horizontal: 24),
child: Row(
children: <Widget>[
Expanded(
child: TextField(
controller: searchController,
decoration: InputDecoration(
hintText: "search wallpapers",
border: InputBorder.none),
)),
InkWell(
onTap: () {
if (searchController.text != "") {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => SearchView(
search: searchController.text,
)));
}
},
child: Container(child: Icon(Icons.search)))
],
),
),
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment