Disable tap action on Community Structure when in specific states

This commit is contained in:
mohammad
2025-06-11 16:02:40 +03:00
parent 3c6f88b245
commit 1393a15eca

View File

@ -30,11 +30,14 @@ class CenterBodyWidget extends StatelessWidget {
mainAxisAlignment: MainAxisAlignment.center,
children: [
GestureDetector(
onTap: () {
context
.read<CenterBodyBloc>()
.add(CommunityStructureSelectedEvent());
},
onTap: state is CommunityStructureState ||
state is CommunitySelectedState
? null
: () {
context
.read<CenterBodyBloc>()
.add(CommunityStructureSelectedEvent());
},
child: Text(
'Community Structure',
style: Theme.of(context).textTheme.bodyLarge!.copyWith(