|
|
|
@ -30,7 +30,38 @@ class ExploreView extends GetView<ExploreController> { |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
// 特色功能 |
|
|
|
_buildFeaturedCard(), |
|
|
|
Container( |
|
|
|
height: 180.h, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.circular(24.r), |
|
|
|
boxShadow: [ |
|
|
|
BoxShadow( |
|
|
|
color: Colors.black.withOpacity(0.2), |
|
|
|
blurRadius: 10, |
|
|
|
offset: const Offset(0, 4), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
child: PageView( |
|
|
|
children: [ |
|
|
|
_buildFeaturedCard( |
|
|
|
'assets/images/explore.png', |
|
|
|
'exploreSlogan'.tr, // 智能耳机,无限可能 |
|
|
|
'exploreAi'.tr, // 探索DeepSound提供的AI功能 |
|
|
|
), |
|
|
|
_buildFeaturedCard( |
|
|
|
'assets/images/explore1.png', |
|
|
|
'exploreSlogan1'.tr, // 智能陪伴,无限可能 |
|
|
|
'exploreAi'.tr, // 探索DeepSound提供的AI功能 |
|
|
|
), |
|
|
|
_buildFeaturedCard( |
|
|
|
'assets/images/explore2.jpg', |
|
|
|
'exploreSlogan2'.tr, // 智能眼镜,无限可能 |
|
|
|
'exploreAi'.tr, // 探索DeepSound提供的AI功能 |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
// AI功能列表 |
|
|
|
SizedBox(height: 24.h), |
|
|
|
@ -132,90 +163,77 @@ class ExploreView extends GetView<ExploreController> { |
|
|
|
} |
|
|
|
|
|
|
|
// 特色功能卡片 |
|
|
|
Widget _buildFeaturedCard() { |
|
|
|
return Container( |
|
|
|
height: 180.h, |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.circular(24.r), |
|
|
|
boxShadow: [ |
|
|
|
BoxShadow( |
|
|
|
color: Colors.black.withOpacity(0.2), |
|
|
|
blurRadius: 10, |
|
|
|
offset: const Offset(0, 4), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
child: Stack( |
|
|
|
children: [ |
|
|
|
// 背景图片 |
|
|
|
ClipRRect( |
|
|
|
borderRadius: BorderRadius.circular(24.r), |
|
|
|
child: Container( |
|
|
|
color: Colors.blue.shade900, // 预设颜色,图片加载失败时显示 |
|
|
|
child: Image.asset( |
|
|
|
'assets/images/explore.png', |
|
|
|
width: double.infinity, |
|
|
|
height: 180.h, |
|
|
|
fit: BoxFit.cover, |
|
|
|
errorBuilder: (context, error, stackTrace) { |
|
|
|
return Container( |
|
|
|
color: Colors.blue.shade900, |
|
|
|
width: double.infinity, |
|
|
|
height: 180.h, |
|
|
|
child: Icon( |
|
|
|
Icons.image_not_supported, |
|
|
|
color: Colors.white, |
|
|
|
size: 40.sp, |
|
|
|
), |
|
|
|
); |
|
|
|
}, |
|
|
|
), |
|
|
|
Widget _buildFeaturedCard(String image, String title, String description) { |
|
|
|
return Stack( |
|
|
|
children: [ |
|
|
|
// 背景图片 |
|
|
|
ClipRRect( |
|
|
|
borderRadius: BorderRadius.circular(24.r), |
|
|
|
child: Container( |
|
|
|
color: Colors.blue.shade900, // 预设颜色,图片加载失败时显示 |
|
|
|
child: Image.asset( |
|
|
|
image, |
|
|
|
width: double.infinity, |
|
|
|
height: 180.h, |
|
|
|
fit: BoxFit.cover, |
|
|
|
errorBuilder: (context, error, stackTrace) { |
|
|
|
return Container( |
|
|
|
color: Colors.blue.shade900, |
|
|
|
width: double.infinity, |
|
|
|
height: 180.h, |
|
|
|
child: Icon( |
|
|
|
Icons.image_not_supported, |
|
|
|
color: Colors.white, |
|
|
|
size: 40.sp, |
|
|
|
), |
|
|
|
); |
|
|
|
}, |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
// 渐变遮罩 |
|
|
|
Container( |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.circular(24.r), |
|
|
|
gradient: LinearGradient( |
|
|
|
begin: Alignment.topCenter, |
|
|
|
end: Alignment.bottomCenter, |
|
|
|
colors: [ |
|
|
|
Colors.black.withOpacity(0.1), |
|
|
|
Colors.black.withOpacity(0.6), |
|
|
|
], |
|
|
|
), |
|
|
|
// 渐变遮罩 |
|
|
|
Container( |
|
|
|
decoration: BoxDecoration( |
|
|
|
borderRadius: BorderRadius.circular(24.r), |
|
|
|
gradient: LinearGradient( |
|
|
|
begin: Alignment.topCenter, |
|
|
|
end: Alignment.bottomCenter, |
|
|
|
colors: [ |
|
|
|
Colors.black.withOpacity(0.1), |
|
|
|
Colors.black.withOpacity(0.6), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
|
|
|
|
// 文本内容 |
|
|
|
Padding( |
|
|
|
padding: EdgeInsets.all(24.w), |
|
|
|
child: Column( |
|
|
|
mainAxisAlignment: MainAxisAlignment.end, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
'exploreSlogan'.tr, // 智能耳机,无限可能 |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 22.sp, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
color: Colors.white, |
|
|
|
), |
|
|
|
// 文本内容 |
|
|
|
Padding( |
|
|
|
padding: EdgeInsets.all(24.w), |
|
|
|
child: Column( |
|
|
|
mainAxisAlignment: MainAxisAlignment.end, |
|
|
|
crossAxisAlignment: CrossAxisAlignment.start, |
|
|
|
children: [ |
|
|
|
Text( |
|
|
|
title, |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 22.sp, |
|
|
|
fontWeight: FontWeight.bold, |
|
|
|
color: Colors.white, |
|
|
|
), |
|
|
|
SizedBox(height: 4.h), |
|
|
|
Text( |
|
|
|
'exploreAi'.tr, // 探索DeepSound提供的AI功能 |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.sp, |
|
|
|
color: Colors.white.withOpacity(0.8), |
|
|
|
), |
|
|
|
), |
|
|
|
SizedBox(height: 4.h), |
|
|
|
Text( |
|
|
|
description, |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 14.sp, |
|
|
|
color: Colors.white.withOpacity(0.8), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
], |
|
|
|
), |
|
|
|
), |
|
|
|
], |
|
|
|
); |
|
|
|
} |
|
|
|
|
|
|
|
|