import 'package:flutter/material.dart'; import 'package:game_tracker/core/custom_theme.dart'; class CustomSearchBar extends StatelessWidget { final TextEditingController controller; final String hintText; final ValueChanged? onChanged; final BoxConstraints? constraints; const CustomSearchBar({ super.key, required this.controller, required this.hintText, this.onChanged, this.constraints, }); @override Widget build(BuildContext context) { return SearchBar( controller: controller, constraints: constraints ?? const BoxConstraints(maxHeight: 45, minHeight: 45), hintText: hintText, onChanged: onChanged, hintStyle: MaterialStateProperty.all(const TextStyle(fontSize: 16)), leading: const Icon(Icons.search), backgroundColor: MaterialStateProperty.all(CustomTheme.boxColor), side: MaterialStateProperty.all(BorderSide(color: CustomTheme.boxBorder)), shape: MaterialStateProperty.all( RoundedRectangleBorder(borderRadius: BorderRadius.circular(12)), ), elevation: MaterialStateProperty.all(0), ); } }