Disable tap action on Community Structure when in specific states (#242)

<!--
  Thanks for contributing!

Provide a description of your changes below and a general summary in the
title

Please look at the following checklist to ensure that your PR can be
accepted quickly:
-->


## Description

<!--- Describe your changes in detail -->
Disable tap action on Community Structure when in specific states
## Type of Change

<!--- Put an `x` in all the boxes that apply: -->

- [ ]  New feature (non-breaking change which adds functionality)
- [x] 🛠️ Bug fix (non-breaking change which fixes an issue)
- [ ]  Breaking change (fix or feature that would cause existing
functionality to change)
- [ ] 🧹 Code refactor
- [ ]  Build configuration change
- [ ] 📝 Documentation
- [ ] 🗑️ Chore
This commit is contained in:
mohammadnemer1
2025-06-11 16:48:10 +03:00
committed by GitHub

View File

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