diff --git a/lib/pages/spaces_management/view/community_list_view.dart b/lib/pages/spaces_management/view/community_list_view.dart index eafd4066..13546ab0 100644 --- a/lib/pages/spaces_management/view/community_list_view.dart +++ b/lib/pages/spaces_management/view/community_list_view.dart @@ -3,7 +3,7 @@ import 'package:syncrow_web/pages/spaces_management/model/community_model.dart'; class CommunityListViewWidget extends StatelessWidget { final List communities; - final Function(CommunityModel) onCommunitySelected; + final Function(CommunityModel?) onCommunitySelected; const CommunityListViewWidget({ Key? key, @@ -32,7 +32,11 @@ class CommunityListViewWidget extends StatelessWidget { itemBuilder: (context, index) { // If the index is 0, display the blank community, otherwise display the normal ones if (index == 0) { - return _buildBlankCommunityCard(size); + return GestureDetector( + onTap: () => + onCommunitySelected(null), // Pass null for blank community + child: _buildBlankCommunityCard(size), + ); } else { return GestureDetector( onTap: () => onCommunitySelected( @@ -71,7 +75,7 @@ class CommunityListViewWidget extends StatelessWidget { height: size.height * 0.02), // Add spacing between container and text // Text saying "Blank" for the blank community - Text( + const Text( 'Blank', textAlign: TextAlign.center, style: TextStyle(