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