전역 구조 리팩터링 및 테스트 확장

This commit is contained in:
JiWoong Sul
2025-09-29 01:51:47 +09:00
parent c00c0c9ab2
commit fef7108479
70 changed files with 7709 additions and 3185 deletions

View File

@@ -1,11 +1,21 @@
import 'package:flutter/material.dart';
import 'package:lucide_icons_flutter/lucide_icons.dart' as lucide;
import 'package:shadcn_ui/shadcn_ui.dart';
class EmptyState extends StatelessWidget {
const EmptyState({super.key, required this.message, this.icon});
/// 데이터가 없을 때 사용자에게 명확한 안내를 제공하는 공통 위젯.
class SuperportEmptyState extends StatelessWidget {
const SuperportEmptyState({
super.key,
required this.title,
this.description,
this.icon = lucide.LucideIcons.inbox,
this.action,
});
final String message;
final String title;
final String? description;
final IconData? icon;
final Widget? action;
@override
Widget build(BuildContext context) {
@@ -16,8 +26,17 @@ class EmptyState extends StatelessWidget {
children: [
if (icon != null)
Icon(icon, size: 48, color: theme.colorScheme.mutedForeground),
if (icon != null) const SizedBox(height: 16),
Text(message, style: theme.textTheme.muted),
const SizedBox(height: 16),
Text(title, style: theme.textTheme.h4),
if (description != null) ...[
const SizedBox(height: 8),
Text(
description!,
style: theme.textTheme.muted,
textAlign: TextAlign.center,
),
],
if (action != null) ...[const SizedBox(height: 20), action!],
],
),
);