part of '../settings_page.dart'; class _CommunitySection extends ConsumerWidget { const _CommunitySection({required this.invitePageBuilder}); final WidgetBuilder invitePageBuilder; @override Widget build(BuildContext context, WidgetRef ref) { final roleAsync = ref.watch(currentCommunityRoleProvider); final canInvite = roleAsync.hasError || canManageCommunityInvites(roleAsync.value); final preference = ref.watch(communityThemeProvider); return AppListCard( label: 'Community', verticalPadding: Grid.twelve, children: [ if (canInvite) AppListRow( icon: LucideIcons.userPlus, title: 'Invite to community', trailing: const _RowChevron(), onTap: () => Navigator.of( context, ).push(MaterialPageRoute(builder: invitePageBuilder)), ), AppListRow( key: const ValueKey('community-theme-row'), icon: LucideIcons.palette, title: 'Theme', value: themeSelectionLabel(preference.theme, preference.mode), trailing: const _RowChevron(), onTap: () => Navigator.of(context).push( MaterialPageRoute(builder: (_) => const ThemePickerPage()), ), ), ], ); } }