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: const Icon(Icons.search, color: Colors.white), hintText: 'Search', hintStyle: TextStyle(color: Colors.white), ), ), ); } }