feat: Enhance project selection interaction by adding tap gesture to collapse dropdown
This commit is contained in:
parent
4ba30145ef
commit
660bd3cdf1
@ -46,6 +46,13 @@ class _LayoutState extends State<Layout> {
|
||||
endDrawer: UserProfileBar(),
|
||||
floatingActionButton: widget.floatingActionButton,
|
||||
body: SafeArea(
|
||||
child: GestureDetector(
|
||||
behavior: HitTestBehavior.translucent,
|
||||
onTap: () {
|
||||
if (projectController.isProjectSelectionExpanded.value) {
|
||||
projectController.isProjectSelectionExpanded.value = false;
|
||||
}
|
||||
},
|
||||
child: Stack(
|
||||
children: [
|
||||
Column(
|
||||
@ -61,13 +68,13 @@ class _LayoutState extends State<Layout> {
|
||||
),
|
||||
],
|
||||
),
|
||||
// Overlay project list below header
|
||||
// Project dropdown overlay
|
||||
Obx(() {
|
||||
if (!projectController.isProjectSelectionExpanded.value) {
|
||||
return const SizedBox.shrink();
|
||||
}
|
||||
return Positioned(
|
||||
top: 95, // Adjust based on header card height
|
||||
top: 95,
|
||||
left: 16,
|
||||
right: 16,
|
||||
child: Material(
|
||||
@ -87,6 +94,7 @@ class _LayoutState extends State<Layout> {
|
||||
],
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user