mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-09 22:57:21 +00:00
sidebar widget
This commit is contained in:
@ -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,
|
||||
|
Reference in New Issue
Block a user