feat: 版本号增加
This commit is contained in:
@@ -82,18 +82,19 @@ class HIMenuView extends GetView<HIMenuController> implements HasSwipeConfig {
|
||||
),
|
||||
// 版本号信息
|
||||
Obx(() {
|
||||
// 1. 从 Obx 的回调函数中 return 一个 Widget
|
||||
return Positioned(
|
||||
bottom: 40.0,
|
||||
left: 0,
|
||||
right: 0,
|
||||
child: Text(
|
||||
'当前版本:${controller.kr_version.value}',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
// 2. 建议使用更稳定的颜色,避免主题切换时出现问题
|
||||
color: Theme.of(context).primaryColor,
|
||||
fontSize: 10.w,
|
||||
child: GestureDetector(
|
||||
onDoubleTap: () => controller.toggleVersionDisplay(),
|
||||
child: Text(
|
||||
'当前版本:${controller.kr_showBuild.value ? '${controller.kr_version.value}.${controller.kr_buildNumber.value}' : controller.kr_version.value}',
|
||||
textAlign: TextAlign.center,
|
||||
style: TextStyle(
|
||||
color: Theme.of(context).primaryColor,
|
||||
fontSize: 10.w,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user