Commit 8f9555c1 authored by Dasun Madushanka's avatar Dasun Madushanka

Update search_box.dart

parent 79c7dd45
...@@ -3,6 +3,7 @@ import 'package:flutter_svg/flutter_svg.dart'; ...@@ -3,6 +3,7 @@ import 'package:flutter_svg/flutter_svg.dart';
import '../constants.dart'; import '../constants.dart';
//search box class
class SearchBox extends StatelessWidget { class SearchBox extends StatelessWidget {
const SearchBox({ const SearchBox({
Key key, Key key,
...@@ -20,8 +21,8 @@ class SearchBox extends StatelessWidget { ...@@ -20,8 +21,8 @@ class SearchBox extends StatelessWidget {
vertical: kDefaultPadding / 4, // 5 top and bottom vertical: kDefaultPadding / 4, // 5 top and bottom
), ),
decoration: BoxDecoration( decoration: BoxDecoration(
color: Colors.white.withOpacity(0.4), color: Colors.white.withOpacity(0.4),//box opacity: 0.4
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),// add circular border
), ),
child: TextField( child: TextField(
onChanged: onChanged, onChanged: onChanged,
...@@ -29,9 +30,9 @@ class SearchBox extends StatelessWidget { ...@@ -29,9 +30,9 @@ class SearchBox extends StatelessWidget {
decoration: InputDecoration( decoration: InputDecoration(
enabledBorder: InputBorder.none, enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none, focusedBorder: InputBorder.none,
icon: SvgPicture.asset("assets/icons/search.svg"), icon: SvgPicture.asset("assets/icons/search.svg"),//add the search icon from assesst folder
hintText: 'Search', hintText: 'Search',//hint text
hintStyle: TextStyle(color: Colors.white), hintStyle: TextStyle(color: Colors.white),//hint style
), ),
), ),
); );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment