Refactor SpaceManagementSidebarHeader to integrate CustomSearchBar and improve layout

This commit is contained in:
Faris Armoush
2025-07-24 15:04:10 +03:00
parent 7d77809750
commit 9d0a1f4883
3 changed files with 47 additions and 26 deletions

View File

@ -7,7 +7,7 @@ class CustomSearchBar extends StatefulWidget {
final TextEditingController? controller;
final String hintText;
final String? searchQuery;
final Function(String)? onSearchChanged; // Callback for search input changes
final void Function(String)? onSearchChanged;
const CustomSearchBar({
super.key,
@ -37,7 +37,7 @@ class _CustomSearchBarState extends State<CustomSearchBar> {
color: ColorsManager.white,
boxShadow: [
BoxShadow(
color: Colors.black.withOpacity(0.2),
color: ColorsManager.shadowBlackColor.withValues(alpha: 0.1),
spreadRadius: 0,
blurRadius: 8,
offset: const Offset(0, 4),
@ -57,7 +57,7 @@ class _CustomSearchBarState extends State<CustomSearchBar> {
style: const TextStyle(
color: Colors.black,
),
onChanged: widget.onSearchChanged, // Call the callback on text change
onChanged: widget.onSearchChanged,
decoration: InputDecoration(
filled: true,
fillColor: ColorsManager.textFieldGreyColor,