mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
blank community should also take to community structure
This commit is contained in:
@ -3,7 +3,7 @@ import 'package:syncrow_web/pages/spaces_management/model/community_model.dart';
|
||||
|
||||
class CommunityListViewWidget extends StatelessWidget {
|
||||
final List<CommunityModel> 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(
|
||||
|
Reference in New Issue
Block a user