UI Polish: Remove redundant header icon, update usage guide assets, add close button to dialog
This commit is contained in:
parent
e038fff77f
commit
4e8b619ec2
|
|
@ -93,17 +93,7 @@ class HomeScreen extends ConsumerWidget {
|
||||||
actions: [
|
actions: [
|
||||||
|
|
||||||
// Normal Actions
|
// Normal Actions
|
||||||
if (isBusinessMode)
|
|
||||||
IconButton(
|
|
||||||
icon: const Icon(LucideIcons.plus),
|
|
||||||
tooltip: 'セット商品を追加',
|
|
||||||
onPressed: () {
|
|
||||||
showDialog(
|
|
||||||
context: context,
|
|
||||||
builder: (context) => const AddSetItemDialog(),
|
|
||||||
);
|
|
||||||
},
|
|
||||||
),
|
|
||||||
|
|
||||||
if (!isSearching) // Show Sort button here if not searching
|
if (!isSearching) // Show Sort button here if not searching
|
||||||
IconButton(
|
IconButton(
|
||||||
|
|
@ -395,29 +385,29 @@ class HomeScreen extends ConsumerWidget {
|
||||||
final userProfile = ref.read(userProfileProvider);
|
final userProfile = ref.read(userProfileProvider);
|
||||||
final isBusinessMode = userProfile.isBusinessMode;
|
final isBusinessMode = userProfile.isBusinessMode;
|
||||||
|
|
||||||
List<Map<String, String>>? pages;
|
List<Map<String, dynamic>>? pages;
|
||||||
|
|
||||||
if (isBusinessMode) {
|
if (isBusinessMode) {
|
||||||
pages = [
|
pages = [
|
||||||
{
|
{
|
||||||
'title': 'ビジネスモードへようこそ',
|
'title': 'ビジネスモードへようこそ',
|
||||||
'description': '飲食店様向けの機能を集約しました。\n在庫管理からメニュー作成まで、\nプロの仕事を強力にサポートします。',
|
'description': '飲食店様向けの機能を集約しました。\n在庫管理からメニュー作成まで、\nプロの仕事を強力にサポートします。',
|
||||||
'icon': '💼',
|
'icon': LucideIcons.briefcase,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': 'セット商品の作成',
|
'title': 'セット商品の作成',
|
||||||
'description': '飲み比べセットやコース料理など、\n複数のお酒をまとめた「セット商品」を\n簡単に作成・管理できます。',
|
'description': '飲み比べセットやコース料理など、\n複数のお酒をまとめた「セット商品」を\n簡単に作成・管理できます。',
|
||||||
'icon': '🍱',
|
'icon': LucideIcons.packagePlus,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': '販促ツール(インスタ)',
|
'title': 'インスタ販促',
|
||||||
'description': '本日のおすすめをSNSですぐに発信。\nInstaタブから、美しい画像を\nワンタップで生成できます。',
|
'description': '本日のおすすめをSNSですぐに発信。\nInstaタブから、美しい画像を\nワンタップで生成できます。',
|
||||||
'icon': '📸',
|
'icon': LucideIcons.instagram,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': '高度な分析',
|
'title': '売上分析',
|
||||||
'description': '売れ筋や味の傾向を分析。\nお客様に喜ばれるラインナップ作りを\nデータで支援します。',
|
'description': '売れ筋や味の傾向を分析。\nお客様に喜ばれるラインナップ作りを\nデータで支援します。',
|
||||||
'icon': '📊',
|
'icon': LucideIcons.barChartBig,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,10 @@
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:google_fonts/google_fonts.dart';
|
import 'package:google_fonts/google_fonts.dart';
|
||||||
|
import 'package:lucide_icons/lucide_icons.dart';
|
||||||
|
|
||||||
class OnboardingDialog extends StatefulWidget {
|
class OnboardingDialog extends StatefulWidget {
|
||||||
final VoidCallback onFinish;
|
final VoidCallback onFinish;
|
||||||
final List<Map<String, String>>? pages; // Optional content
|
final List<Map<String, dynamic>>? pages; // Support dynamic for IconData
|
||||||
|
|
||||||
const OnboardingDialog({super.key, required this.onFinish, this.pages});
|
const OnboardingDialog({super.key, required this.onFinish, this.pages});
|
||||||
|
|
||||||
|
|
@ -15,7 +16,7 @@ class _OnboardingDialogState extends State<OnboardingDialog> {
|
||||||
final PageController _controller = PageController();
|
final PageController _controller = PageController();
|
||||||
int _currentPage = 0;
|
int _currentPage = 0;
|
||||||
|
|
||||||
late final List<Map<String, String>> _pages;
|
late final List<Map<String, dynamic>> _pages;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
|
@ -24,22 +25,22 @@ class _OnboardingDialogState extends State<OnboardingDialog> {
|
||||||
{
|
{
|
||||||
'title': '日本酒の『魂』を保存する',
|
'title': '日本酒の『魂』を保存する',
|
||||||
'description': 'Ponshu Roomへようこそ。\n飲んだ日本酒のラベルを撮影するだけで、\nAIが情報を解析し、あなたのリストに加えます。',
|
'description': 'Ponshu Roomへようこそ。\n飲んだ日本酒のラベルを撮影するだけで、\nAIが情報を解析し、あなたのリストに加えます。',
|
||||||
'icon': '🍶',
|
'icon': LucideIcons.wine,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': 'ラベルを撮るだけ',
|
'title': 'ラベルを撮るだけ',
|
||||||
'description': '面倒な入力は不要です。\nラベルの写真を撮れば、銘柄、蔵元、味わいまで\nAIが自動でデータベース化します。',
|
'description': '面倒な入力は不要です。\nラベルの写真を撮れば、銘柄、蔵元、味わいまで\nAIが自動でデータベース化します。',
|
||||||
'icon': '📸',
|
'icon': LucideIcons.camera,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': 'あなただけのお品書き',
|
'title': 'あなただけのお品書き',
|
||||||
'description': '集めたコレクションから、\nボタンひとつで美しいお品書きPDFを作成。\n飲食店の方も、個人の方も楽しめます。',
|
'description': '集めたコレクションから、\nボタンひとつで美しいお品書きPDFを作成。\n飲食店の方も、個人の方も楽しめます。',
|
||||||
'icon': '📜',
|
'icon': LucideIcons.scrollText,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
'title': 'さあ、始めましょう',
|
'title': 'さあ、始めましょう',
|
||||||
'description': 'AIの力で、日本酒ライフをもっと豊かに。\n右下のカメラボタンからスタートしてください。',
|
'description': 'AIの力で、日本酒ライフをもっと豊かに。\n右下のカメラボタンからスタートしてください。',
|
||||||
'icon': '✨',
|
'icon': LucideIcons.sparkles,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
@ -49,7 +50,11 @@ class _OnboardingDialogState extends State<OnboardingDialog> {
|
||||||
return Dialog(
|
return Dialog(
|
||||||
backgroundColor: Colors.transparent, // Custom shape
|
backgroundColor: Colors.transparent, // Custom shape
|
||||||
insetPadding: const EdgeInsets.all(20),
|
insetPadding: const EdgeInsets.all(20),
|
||||||
child: Container(
|
child: Stack(
|
||||||
|
clipBehavior: Clip.none,
|
||||||
|
alignment: Alignment.center,
|
||||||
|
children: [
|
||||||
|
Container(
|
||||||
height: 500,
|
height: 500,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
color: Theme.of(context).scaffoldBackgroundColor,
|
color: Theme.of(context).scaffoldBackgroundColor,
|
||||||
|
|
@ -71,6 +76,8 @@ class _OnboardingDialogState extends State<OnboardingDialog> {
|
||||||
itemCount: _pages.length,
|
itemCount: _pages.length,
|
||||||
itemBuilder: (context, index) {
|
itemBuilder: (context, index) {
|
||||||
final page = _pages[index];
|
final page = _pages[index];
|
||||||
|
final iconData = page['icon'];
|
||||||
|
|
||||||
return Center(
|
return Center(
|
||||||
child: SingleChildScrollView(
|
child: SingleChildScrollView(
|
||||||
child: Padding(
|
child: Padding(
|
||||||
|
|
@ -78,8 +85,11 @@ class _OnboardingDialogState extends State<OnboardingDialog> {
|
||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
if (iconData is IconData)
|
||||||
|
Icon(iconData, size: 80, color: Theme.of(context).primaryColor)
|
||||||
|
else
|
||||||
Text(
|
Text(
|
||||||
page['icon']!,
|
iconData.toString(),
|
||||||
style: const TextStyle(fontSize: 80),
|
style: const TextStyle(fontSize: 80),
|
||||||
),
|
),
|
||||||
const SizedBox(height: 32),
|
const SizedBox(height: 32),
|
||||||
|
|
@ -161,6 +171,32 @@ class _OnboardingDialogState extends State<OnboardingDialog> {
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
// Close Button
|
||||||
|
Positioned(
|
||||||
|
top: -12,
|
||||||
|
right: -12,
|
||||||
|
child: GestureDetector(
|
||||||
|
onTap: widget.onFinish,
|
||||||
|
child: Container(
|
||||||
|
padding: const EdgeInsets.all(8),
|
||||||
|
decoration: BoxDecoration(
|
||||||
|
color: Theme.of(context).scaffoldBackgroundColor,
|
||||||
|
shape: BoxShape.circle,
|
||||||
|
boxShadow: [
|
||||||
|
BoxShadow(
|
||||||
|
color: Colors.black.withValues(alpha: 0.2),
|
||||||
|
blurRadius: 8,
|
||||||
|
offset: const Offset(0, 4),
|
||||||
|
)
|
||||||
|
],
|
||||||
|
),
|
||||||
|
child: const Icon(LucideIcons.x, size: 24),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue