계정 정보 다이얼로그 추가 및 전체 목록 페치 개선

This commit is contained in:
JiWoong Sul
2025-10-22 01:05:47 +09:00
parent 6b58effc83
commit f4dc83d441
44 changed files with 1636 additions and 362 deletions

View File

@@ -51,7 +51,10 @@ class SuperportToast {
),
};
final messenger = ScaffoldMessenger.of(context);
final messenger = ScaffoldMessenger.maybeOf(context);
if (messenger == null) {
return;
}
messenger
..hideCurrentSnackBar()
..showSnackBar(

View File

@@ -276,9 +276,15 @@ class _PaginationFooter extends StatelessWidget {
@override
Widget build(BuildContext context) {
final theme = ShadTheme.of(context);
final currentPage = pagination.currentPage.clamp(1, pagination.totalPages);
final int totalPages =
pagination.totalPages <= 0 ? 1 : pagination.totalPages;
final int currentPage = pagination.currentPage < 1
? 1
: (pagination.currentPage > totalPages
? totalPages
: pagination.currentPage);
final canGoPrev = currentPage > 1 && !isLoading;
final canGoNext = currentPage < pagination.totalPages && !isLoading;
final canGoNext = currentPage < totalPages && !isLoading;
return Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
@@ -306,10 +312,16 @@ class _PaginationFooter extends StatelessWidget {
Row(
children: [
Text(
'${pagination.totalItems}건 · 페이지 $currentPage / ${pagination.totalPages}',
'${pagination.totalItems}건 · 페이지 $currentPage / $totalPages',
style: theme.textTheme.small,
),
const SizedBox(width: 12),
ShadButton.ghost(
size: ShadButtonSize.sm,
onPressed: canGoPrev ? () => onPageChange?.call(1) : null,
child: const Icon(lucide.LucideIcons.chevronsLeft, size: 16),
),
const SizedBox(width: 8),
ShadButton.ghost(
size: ShadButtonSize.sm,
onPressed: canGoPrev
@@ -325,6 +337,13 @@ class _PaginationFooter extends StatelessWidget {
: null,
child: const Icon(lucide.LucideIcons.chevronRight, size: 16),
),
const SizedBox(width: 8),
ShadButton.ghost(
size: ShadButtonSize.sm,
onPressed:
canGoNext ? () => onPageChange?.call(totalPages) : null,
child: const Icon(lucide.LucideIcons.chevronsRight, size: 16),
),
],
),
],