Created
May 18, 2020 08:58
-
-
Save theindianappguy/2ce5dd2afa13f6ef5d7126f732dae8f9 to your computer and use it in GitHub Desktop.
Search Bar for Wallpaper App FLutter by Sanskar Tiwari (theindianappguy)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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