buildChatsSectionUI method
dynamic
buildChatsSectionUI( - dynamic context,
- dynamic ref,
- List<String> chats
)
Implementation
Widget buildChatsSectionUI(
BuildContext context,
WidgetRef ref,
List<String> chats,
) {
final relatedChats =
ref.watch(remoteChatRelationsProvider(spaceId)).valueOrNull ?? [];
final config = calculateSectionConfig(
localListLen: chats.length,
limit: limit,
remoteListLen: relatedChats.length,
);
return Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
SectionHeader(
title: L10n.of(context).chats,
isShowSeeAllButton: config.isShowSeeAllButton,
onTapSeeAll: () => context.pushNamed(
Routes.spaceChats.name,
pathParameters: {'spaceId': spaceId},
),
),
chatsListUI(
ref,
spaceId,
chats,
config.listingLimit,
showOptions: false,
),
if (config.renderRemote)
renderFurther(
context,
ref,
spaceId,
config.remoteCount,
),
],
);
}