feat(app): add manual entry and sharing flows
This commit is contained in:
@@ -3,18 +3,18 @@ import '../constants/app_colors.dart';
|
||||
import '../constants/app_typography.dart';
|
||||
|
||||
/// 커스텀 에러 위젯
|
||||
///
|
||||
///
|
||||
/// Flutter의 기본 ErrorWidget과 이름 충돌을 피하기 위해 CustomErrorWidget으로 명명
|
||||
class CustomErrorWidget extends StatelessWidget {
|
||||
/// 에러 메시지
|
||||
final String message;
|
||||
|
||||
|
||||
/// 에러 아이콘 (선택사항)
|
||||
final IconData? icon;
|
||||
|
||||
|
||||
/// 재시도 버튼 콜백 (선택사항)
|
||||
final VoidCallback? onRetry;
|
||||
|
||||
|
||||
/// 상세 에러 메시지 (선택사항)
|
||||
final String? details;
|
||||
|
||||
@@ -29,7 +29,7 @@ class CustomErrorWidget extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
|
||||
|
||||
return Center(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(24.0),
|
||||
@@ -44,14 +44,14 @@ class CustomErrorWidget extends StatelessWidget {
|
||||
color: isDark ? AppColors.darkError : AppColors.lightError,
|
||||
),
|
||||
const SizedBox(height: 16),
|
||||
|
||||
|
||||
// 에러 메시지
|
||||
Text(
|
||||
message,
|
||||
style: AppTypography.heading2(isDark),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
|
||||
|
||||
// 상세 메시지 (있을 경우)
|
||||
if (details != null) ...[
|
||||
const SizedBox(height: 8),
|
||||
@@ -61,7 +61,7 @@ class CustomErrorWidget extends StatelessWidget {
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
],
|
||||
|
||||
|
||||
// 재시도 버튼 (있을 경우)
|
||||
if (onRetry != null) ...[
|
||||
const SizedBox(height: 24),
|
||||
@@ -70,8 +70,8 @@ class CustomErrorWidget extends StatelessWidget {
|
||||
icon: const Icon(Icons.refresh),
|
||||
label: const Text('다시 시도'),
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: isDark
|
||||
? AppColors.darkPrimary
|
||||
backgroundColor: isDark
|
||||
? AppColors.darkPrimary
|
||||
: AppColors.lightPrimary,
|
||||
foregroundColor: Colors.white,
|
||||
padding: const EdgeInsets.symmetric(
|
||||
@@ -96,21 +96,16 @@ void showErrorSnackBar({
|
||||
SnackBarAction? action,
|
||||
}) {
|
||||
final isDark = Theme.of(context).brightness == Brightness.dark;
|
||||
|
||||
|
||||
ScaffoldMessenger.of(context).showSnackBar(
|
||||
SnackBar(
|
||||
content: Text(
|
||||
message,
|
||||
style: const TextStyle(color: Colors.white),
|
||||
),
|
||||
content: Text(message, style: const TextStyle(color: Colors.white)),
|
||||
backgroundColor: isDark ? AppColors.darkError : AppColors.lightError,
|
||||
duration: duration,
|
||||
action: action,
|
||||
behavior: SnackBarBehavior.floating,
|
||||
shape: RoundedRectangleBorder(
|
||||
borderRadius: BorderRadius.circular(8),
|
||||
),
|
||||
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
|
||||
margin: const EdgeInsets.all(8),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user