Commit 3746c58a authored by Dasun Madushanka's avatar Dasun Madushanka

Update search_box.dart

parent 6560e26b
...@@ -3,6 +3,8 @@ import 'package:flutter_svg/flutter_svg.dart'; ...@@ -3,6 +3,8 @@ import 'package:flutter_svg/flutter_svg.dart';
import '../constants.dart'; import '../constants.dart';
//seacrh box view
class SearchBox extends StatelessWidget { class SearchBox extends StatelessWidget {
const SearchBox({ const SearchBox({
Key key, Key key,
...@@ -20,18 +22,18 @@ class SearchBox extends StatelessWidget { ...@@ -20,18 +22,18 @@ 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),//opacity 0.4
borderRadius: BorderRadius.circular(12), borderRadius: BorderRadius.circular(12),//circuler border
), ),
child: TextField( child: TextField(
onChanged: onChanged, onChanged: onChanged,
style: TextStyle(color: Colors.white), style: TextStyle(color: Colors.white),//text format in box
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"),//include from assessts folder
hintText: 'Search', hintText: 'Search',//hint
hintStyle: TextStyle(color: Colors.white), hintStyle: TextStyle(color: Colors.white),//hint format
), ),
), ),
); );
......
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