ponshu-room-lite/lib/widgets/home/home_empty_state.dart

47 lines
1.6 KiB
Dart
Raw Normal View History

import 'package:flutter/material.dart';
import 'package:lucide_icons/lucide_icons.dart';
import '../../theme/app_colors.dart';
class HomeEmptyState extends StatelessWidget {
2026-01-15 15:53:44 +00:00
final bool isMenuMode;
const HomeEmptyState({
super.key,
this.isMenuMode = false,
});
@override
Widget build(BuildContext context) {
final appColors = Theme.of(context).extension<AppColors>()!;
return Center(
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
children: [
2026-01-15 15:53:44 +00:00
isMenuMode
? Icon(LucideIcons.scrollText, size: 80, color: appColors.brandPrimary.withValues(alpha: 0.5))
2026-01-15 15:53:44 +00:00
: const Text('🍶', style: TextStyle(fontSize: 80)),
const SizedBox(height: 16),
Text(
2026-01-15 15:53:44 +00:00
isMenuMode ? 'お品書きに載せる日本酒がありません' : '日本酒のラベルを撮ってみましょう',
style: Theme.of(context).textTheme.titleLarge?.copyWith(
color: appColors.textPrimary,
fontWeight: FontWeight.bold
),
),
const SizedBox(height: 8),
Text(
isMenuMode
2026-01-15 15:53:44 +00:00
? 'まずはホーム画面に戻って、\n日本酒を登録してください'
: '右下のカメラボタンから「瞬撮」できます!\n長押しでギャラリーから追加もできます',
textAlign: TextAlign.center,
style: Theme.of(context).textTheme.bodyMedium?.copyWith(
color: appColors.textSecondary,
),
),
],
),
);
}
}