buildSuggestedSpacesSectionUI method

dynamic buildSuggestedSpacesSectionUI(
  1. dynamic context,
  2. dynamic ref,
  3. List<String> suggestedLocalSpaces,
  4. List suggestedRemoteSpaces,
)

Implementation

Widget buildSuggestedSpacesSectionUI(
  BuildContext context,
  WidgetRef ref,
  List<String> suggestedLocalSpaces,
  List<SpaceHierarchyRoomInfo> suggestedRemoteSpaces,
) {
  final config = calculateSectionConfig(
    localListLen: suggestedLocalSpaces.length,
    limit: limit,
    remoteListLen: suggestedRemoteSpaces.length,
  );
  return Column(
    mainAxisAlignment: MainAxisAlignment.start,
    crossAxisAlignment: CrossAxisAlignment.start,
    children: [
      SectionHeader(
        title: L10n.of(context).suggestedSpaces,
        isShowSeeAllButton: true,
        onTapSeeAll: () => context.pushNamed(
          Routes.spaceRelatedSpaces.name,
          pathParameters: {'spaceId': spaceId},
        ),
      ),
      spacesListUI(
        suggestedLocalSpaces,
        config.listingLimit,
        // showOptions: false,
        // showSuggestedMarkIfGiven: false,
      ),
      if (config.renderRemote)
        renderRemoteSubspaces(
          context,
          ref,
          spaceId,
          suggestedRemoteSpaces,
          maxLength: config.remoteCount,
        ),
    ],
  );
}