sidebar widget

This commit is contained in:
hannathkadher
2024-09-26 14:49:19 +04:00
parent b40998558e
commit fe3525d255
4 changed files with 67 additions and 30 deletions

View File

@ -6,12 +6,14 @@ import 'package:syncrow_web/utils/constants/assets.dart';
class CustomSearchBar extends StatelessWidget {
final TextEditingController? controller;
final String hintText;
final Function(String)? onSearchChanged; // Callback for search input changes
const CustomSearchBar({
Key? key,
super.key,
this.controller,
this.hintText = 'Search',
}) : super(key: key);
this.onSearchChanged,
});
@override
Widget build(BuildContext context) {
@ -39,6 +41,7 @@ class CustomSearchBar extends StatelessWidget {
style: const TextStyle(
color: Colors.black,
),
onChanged: onSearchChanged, // Call the callback on text change
decoration: InputDecoration(
filled: true,
fillColor: ColorsManager.textFieldGreyColor,