buildSpacesSectionUI method
dynamic
buildSpacesSectionUI( - dynamic context,
- dynamic ref,
- List<String> spaces
)
Implementation
Widget buildSpacesSectionUI(
BuildContext context,
WidgetRef ref,
List<String> spaces,
) {
final subspaces = ref.watch(remoteSubspaceRelationsProvider(spaceId));
final config = calculateSectionConfig(
localListLen: spaces.length,
limit: limit,
remoteListLen: (subspaces.valueOrNull ?? []).length,
);
return Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SectionHeader(
title: L10n.of(context).spaces,
isShowSeeAllButton: config.isShowSeeAllButton,
onTapSeeAll: () => context.pushNamed(
Routes.spaceRelatedSpaces.name,
pathParameters: {'spaceId': spaceId},
),
),
spacesListUI(spaces, config.listingLimit),
if (config.renderRemote)
renderMoreSubspaces(
context,
ref,
spaceId,
maxLength: config.remoteCount,
padding: EdgeInsets.zero,
),
],
);
}