|
|
|
@ -40,7 +40,7 @@ class SplashView extends GetView<SplashController> { |
|
|
|
), |
|
|
|
|
|
|
|
// 版本号 |
|
|
|
_buildVersionInfo(isDarkMode), |
|
|
|
//_buildVersionInfo(isDarkMode), |
|
|
|
], |
|
|
|
), |
|
|
|
); |
|
|
|
@ -148,6 +148,7 @@ class SplashView extends GetView<SplashController> { |
|
|
|
padding: EdgeInsets.symmetric(horizontal: 80.w), |
|
|
|
child: Stack( |
|
|
|
children: [ |
|
|
|
// 背景条 |
|
|
|
Container( |
|
|
|
height: 4.h, |
|
|
|
decoration: BoxDecoration( |
|
|
|
@ -155,23 +156,28 @@ class SplashView extends GetView<SplashController> { |
|
|
|
borderRadius: BorderRadius.circular(2.r), |
|
|
|
), |
|
|
|
), |
|
|
|
// 进度条 |
|
|
|
Obx(() { |
|
|
|
final progress = controller.loadingProgress; |
|
|
|
return LayoutBuilder( |
|
|
|
builder: (context, constraints) { |
|
|
|
return Container( |
|
|
|
height: 4.h, |
|
|
|
width: constraints.maxWidth * progress, |
|
|
|
decoration: BoxDecoration( |
|
|
|
gradient: const LinearGradient( |
|
|
|
begin: Alignment.centerLeft, |
|
|
|
end: Alignment.centerRight, |
|
|
|
colors: [Colors.blue, Colors.purple], |
|
|
|
), |
|
|
|
borderRadius: BorderRadius.circular(2.r), |
|
|
|
return AnimatedContainer( |
|
|
|
duration: const Duration(milliseconds: 200), |
|
|
|
height: 4.h, |
|
|
|
width: 240.w * progress, // 使用固定宽度乘以进度 |
|
|
|
decoration: BoxDecoration( |
|
|
|
gradient: const LinearGradient( |
|
|
|
begin: Alignment.centerLeft, |
|
|
|
end: Alignment.centerRight, |
|
|
|
colors: [Colors.blue, Colors.purple], |
|
|
|
), |
|
|
|
borderRadius: BorderRadius.circular(2.r), |
|
|
|
boxShadow: [ |
|
|
|
BoxShadow( |
|
|
|
color: Colors.blue.withOpacity(0.3), |
|
|
|
blurRadius: 5, |
|
|
|
offset: const Offset(0, 1), |
|
|
|
), |
|
|
|
); |
|
|
|
}, |
|
|
|
], |
|
|
|
), |
|
|
|
); |
|
|
|
}), |
|
|
|
], |
|
|
|
@ -201,20 +207,21 @@ class SplashView extends GetView<SplashController> { |
|
|
|
} |
|
|
|
|
|
|
|
// 版本信息 |
|
|
|
Widget _buildVersionInfo(bool isDarkMode) { |
|
|
|
return Positioned( |
|
|
|
bottom: 32.h, |
|
|
|
left: 0, |
|
|
|
right: 0, |
|
|
|
child: Center( |
|
|
|
child: Text( |
|
|
|
controller.version, |
|
|
|
style: TextStyle( |
|
|
|
fontSize: 12.sp, |
|
|
|
color: isDarkMode ? Colors.grey[500] : Colors.grey[400], |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
); |
|
|
|
} |
|
|
|
// 暂时不需要版本号显示,保留代码以备将来使用 |
|
|
|
// Widget _buildVersionInfo(bool isDarkMode) { |
|
|
|
// return Positioned( |
|
|
|
// bottom: 32.h, |
|
|
|
// left: 0, |
|
|
|
// right: 0, |
|
|
|
// child: Center( |
|
|
|
// child: Text( |
|
|
|
// controller.version, |
|
|
|
// style: TextStyle( |
|
|
|
// fontSize: 12.sp, |
|
|
|
// color: isDarkMode ? Colors.grey[500] : Colors.grey[400], |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// ), |
|
|
|
// ); |
|
|
|
// } |
|
|
|
} |
|
|
|
|