import 'package:flutter/material.dart'; import 'package:lucide_icons_flutter/lucide_icons.dart' as lucide; import 'package:shadcn_ui/shadcn_ui.dart'; /// 기능이 비활성화된 상태에서 안내 메시지를 보여주는 공통 플레이스홀더. /// /// - 기능 플래그나 서버 준비 상태 등으로 화면을 대신할 때 사용한다. /// - 사용자가 다음 액션을 쉽게 파악할 수 있도록 제목/설명을 함께 제공한다. class FeatureDisabledPlaceholder extends StatelessWidget { const FeatureDisabledPlaceholder({ super.key, required this.title, required this.description, this.icon, this.hints = const [], }); final String title; final String description; final IconData? icon; final List hints; @override Widget build(BuildContext context) { final theme = ShadTheme.of(context); return Center( child: ConstrainedBox( constraints: const BoxConstraints(maxWidth: 560), child: ShadCard( title: Row( children: [ Icon( icon ?? lucide.LucideIcons.info, size: 18, color: theme.colorScheme.mutedForeground, ), const SizedBox(width: 10), Text(title, style: theme.textTheme.h3), ], ), description: Text(description, style: theme.textTheme.muted), child: Column( crossAxisAlignment: CrossAxisAlignment.start, children: [ if (hints.isNotEmpty) ...[ for (final hint in hints) Padding( padding: const EdgeInsets.only(bottom: 12), child: hint, ), ] else Padding( padding: const EdgeInsets.symmetric(vertical: 12), child: Text( '기능이 활성화되면 이 영역에서 실제 데이터를 확인할 수 있습니다.', style: theme.textTheme.small, ), ), ], ), ), ), ); } }