buildSuggestedChatsSectionUI method
dynamic
buildSuggestedChatsSectionUI( - dynamic context,
- dynamic ref,
- List<String> suggestedLocalChats,
- List suggestedRemoteChats,
)
Implementation
Widget buildSuggestedChatsSectionUI(
BuildContext context,
WidgetRef ref,
List<String> suggestedLocalChats,
List<SpaceHierarchyRoomInfo> suggestedRemoteChats,
) {
final config = calculateSectionConfig(
localListLen: suggestedLocalChats.length,
limit: limit,
remoteListLen: suggestedRemoteChats.length,
);
return Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SectionHeader(
title: L10n.of(context).suggestedChats,
isShowSeeAllButton: true,
onTapSeeAll: () => context.pushNamed(
Routes.spaceChats.name,
pathParameters: {'spaceId': spaceId},
),
),
chatsListUI(
ref,
spaceId,
suggestedLocalChats,
config.listingLimit,
showOptions: false,
showSuggestedMarkIfGiven: false,
),
if (config.renderRemote)
renderRemoteChats(
context,
ref,
spaceId,
suggestedRemoteChats,
config.remoteCount,
showSuggestedMarkIfGiven: false,
renderMenu: false,
),
],
);
}