mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 15:17:31 +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 {
|
class CommunityListViewWidget extends StatelessWidget {
|
||||||
final List<CommunityModel> communities;
|
final List<CommunityModel> communities;
|
||||||
final Function(CommunityModel) onCommunitySelected;
|
final Function(CommunityModel?) onCommunitySelected;
|
||||||
|
|
||||||
const CommunityListViewWidget({
|
const CommunityListViewWidget({
|
||||||
Key? key,
|
Key? key,
|
||||||
@ -32,7 +32,11 @@ class CommunityListViewWidget extends StatelessWidget {
|
|||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
// If the index is 0, display the blank community, otherwise display the normal ones
|
// If the index is 0, display the blank community, otherwise display the normal ones
|
||||||
if (index == 0) {
|
if (index == 0) {
|
||||||
return _buildBlankCommunityCard(size);
|
return GestureDetector(
|
||||||
|
onTap: () =>
|
||||||
|
onCommunitySelected(null), // Pass null for blank community
|
||||||
|
child: _buildBlankCommunityCard(size),
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
return GestureDetector(
|
return GestureDetector(
|
||||||
onTap: () => onCommunitySelected(
|
onTap: () => onCommunitySelected(
|
||||||
@ -71,7 +75,7 @@ class CommunityListViewWidget extends StatelessWidget {
|
|||||||
height:
|
height:
|
||||||
size.height * 0.02), // Add spacing between container and text
|
size.height * 0.02), // Add spacing between container and text
|
||||||
// Text saying "Blank" for the blank community
|
// Text saying "Blank" for the blank community
|
||||||
Text(
|
const Text(
|
||||||
'Blank',
|
'Blank',
|
||||||
textAlign: TextAlign.center,
|
textAlign: TextAlign.center,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
|
Reference in New Issue
Block a user