Commit 69c81a3d authored by Dasun Madushanka's avatar Dasun Madushanka

update searchbox

parent 72008336
import 'package:flutter/material.dart';
import 'package:flutter_svg/flutter_svg.dart';
import '../constants.dart';
class SearchBox extends StatelessWidget {
const SearchBox({
Key key,
this.onChanged,
}) : super(key: key);
final ValueChanged onChanged;
@override
Widget build(BuildContext context) {
return Container(
margin: EdgeInsets.all(kDefaultPadding),
padding: EdgeInsets.symmetric(
horizontal: kDefaultPadding,
vertical: kDefaultPadding / 4, // 5 top and bottom
),
decoration: BoxDecoration(
color: Colors.white.withOpacity(0.4),
borderRadius: BorderRadius.circular(12),
),
child: TextField(
onChanged: onChanged,
style: TextStyle(color: Colors.white),
decoration: InputDecoration(
enabledBorder: InputBorder.none,
focusedBorder: InputBorder.none,
icon: SvgPicture.asset("assets/icons/search.svg"),
hintText: 'Search',
hintStyle: TextStyle(color: Colors.white),
),
),
);
}
}
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