优化
This commit is contained in:
@@ -27,7 +27,8 @@
|
|||||||
"Bash(git restore:*)",
|
"Bash(git restore:*)",
|
||||||
"Bash(ssh root@8.155.172.147 \"tail -100 /www/wwwroot/logs/app.log\")",
|
"Bash(ssh root@8.155.172.147 \"tail -100 /www/wwwroot/logs/app.log\")",
|
||||||
"Bash(mvn compile:*)",
|
"Bash(mvn compile:*)",
|
||||||
"Bash(git checkout:*)"
|
"Bash(git checkout:*)",
|
||||||
|
"Bash(flutter create:*)"
|
||||||
],
|
],
|
||||||
"additionalDirectories": [
|
"additionalDirectories": [
|
||||||
"/Users/sion/Desktop/projects/monisuo/monisuo-admin/.git"
|
"/Users/sion/Desktop/projects/monisuo/monisuo-admin/.git"
|
||||||
|
|||||||
@@ -7,13 +7,15 @@ import '../../../core/storage/local_storage.dart';
|
|||||||
class _OnboardingItem {
|
class _OnboardingItem {
|
||||||
final String title;
|
final String title;
|
||||||
final String description;
|
final String description;
|
||||||
final IconData icon;
|
final IconData? icon; // 图标(二选一)
|
||||||
|
final String? imagePath; // 图片路径(二选一)
|
||||||
final List<Color> gradientColors;
|
final List<Color> gradientColors;
|
||||||
|
|
||||||
const _OnboardingItem({
|
const _OnboardingItem({
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.description,
|
required this.description,
|
||||||
required this.icon,
|
this.icon,
|
||||||
|
this.imagePath,
|
||||||
required this.gradientColors,
|
required this.gradientColors,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -36,25 +38,25 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
|||||||
_OnboardingItem(
|
_OnboardingItem(
|
||||||
title: '实时行情',
|
title: '实时行情',
|
||||||
description: '全球市场行情实时更新,把握每一个投资机会',
|
description: '全球市场行情实时更新,把握每一个投资机会',
|
||||||
icon: LucideIcons.trendingUp,
|
imagePath: 'assets/images/onboarding_1.png', // 替换为你的图片
|
||||||
gradientColors: [Color(0xFF6366F1), Color(0xFF8B5CF6)],
|
gradientColors: [Color(0xFF6366F1), Color(0xFF8B5CF6)],
|
||||||
),
|
),
|
||||||
_OnboardingItem(
|
_OnboardingItem(
|
||||||
title: '模拟交易',
|
title: '模拟交易',
|
||||||
description: '零风险体验真实交易,学习投资策略',
|
description: '零风险体验真实交易,学习投资策略',
|
||||||
icon: LucideIcons.arrowLeftRight,
|
imagePath: 'assets/images/onboarding_2.png', // 替换为你的图片
|
||||||
gradientColors: [Color(0xFF10B981), Color(0xFF059669)],
|
gradientColors: [Color(0xFF10B981), Color(0xFF059669)],
|
||||||
),
|
),
|
||||||
_OnboardingItem(
|
_OnboardingItem(
|
||||||
title: '资产管理',
|
title: '资产管理',
|
||||||
description: '清晰的资产概览,轻松管理你的投资组合',
|
description: '清晰的资产概览,轻松管理你的投资组合',
|
||||||
icon: LucideIcons.wallet,
|
imagePath: 'assets/images/onboarding_3.png', // 替换为你的图片
|
||||||
gradientColors: [Color(0xFFF59E0B), Color(0xFFD97706)],
|
gradientColors: [Color(0xFFF59E0B), Color(0xFFD97706)],
|
||||||
),
|
),
|
||||||
_OnboardingItem(
|
_OnboardingItem(
|
||||||
title: '安全可靠',
|
title: '安全可靠',
|
||||||
description: '数据加密存储,保护你的隐私安全',
|
description: '数据加密存储,保护你的隐私安全',
|
||||||
icon: LucideIcons.shieldCheck,
|
imagePath: 'assets/images/onboarding_4.png', // 替换为你的图片
|
||||||
gradientColors: [Color(0xFFEC4899), Color(0xFFBE185D)],
|
gradientColors: [Color(0xFFEC4899), Color(0xFFBE185D)],
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
@@ -191,10 +193,10 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
|||||||
child: Column(
|
child: Column(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
// 图标容器
|
// 图标/图片容器
|
||||||
Container(
|
Container(
|
||||||
width: 160,
|
width: 200,
|
||||||
height: 160,
|
height: 200,
|
||||||
decoration: BoxDecoration(
|
decoration: BoxDecoration(
|
||||||
gradient: LinearGradient(
|
gradient: LinearGradient(
|
||||||
begin: Alignment.topLeft,
|
begin: Alignment.topLeft,
|
||||||
@@ -211,11 +213,28 @@ class _OnboardingPageState extends State<OnboardingPage> {
|
|||||||
],
|
],
|
||||||
),
|
),
|
||||||
child: Center(
|
child: Center(
|
||||||
child: Icon(
|
child: item.imagePath != null
|
||||||
item.icon,
|
? ClipOval(
|
||||||
size: 72,
|
child: Image.asset(
|
||||||
color: Colors.white,
|
item.imagePath!,
|
||||||
),
|
width: 180,
|
||||||
|
height: 180,
|
||||||
|
fit: BoxFit.cover,
|
||||||
|
errorBuilder: (context, error, stackTrace) {
|
||||||
|
// 图片加载失败时显示图标
|
||||||
|
return Icon(
|
||||||
|
item.icon ?? LucideIcons.image,
|
||||||
|
size: 72,
|
||||||
|
color: Colors.white,
|
||||||
|
);
|
||||||
|
},
|
||||||
|
),
|
||||||
|
)
|
||||||
|
: Icon(
|
||||||
|
item.icon ?? LucideIcons.star,
|
||||||
|
size: 72,
|
||||||
|
color: Colors.white,
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(height: AppSpacing.xxl + AppSpacing.lg),
|
const SizedBox(height: AppSpacing.xxl + AppSpacing.lg),
|
||||||
|
|||||||
Reference in New Issue
Block a user