hi-client/lib/app/widgets/hi_help_entrance.dart
speakeloudest f42a481452
Some checks failed
Build Android APK / 编译 libcore.aar (push) Has been cancelled
Build Android APK / 编译 Android APK (release) (push) Has been cancelled
Build Android APK / 创建 GitHub Release (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Android) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Windows) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (macOS) (push) Has been cancelled
Build Multi-Platform / 编译 libcore (Linux) (push) Has been cancelled
Build Multi-Platform / 构建 Android APK (push) Has been cancelled
Build Multi-Platform / 构建 Windows (push) Has been cancelled
Build Multi-Platform / 构建 macOS (push) Has been cancelled
Build Multi-Platform / 构建 Linux (push) Has been cancelled
Build Multi-Platform / 创建 Release (push) Has been cancelled
Build Windows / build (push) Has been cancelled
feat: 更新代码仓库全部修改
2025-10-30 04:47:53 -07:00

78 lines
2.2 KiB
Dart

// lib/app/widgets/hi_help_entrance.dart
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:kaer_with_panels/app/widgets/kr_local_image.dart';
import 'package:get/get.dart';
import 'package:kaer_with_panels/app/routes/app_pages.dart';
/// 全局统一的帮助入口 Widget (HI 前缀)
///
/// 通常放置在 Stack 的顶层,通过 Positioned 控制位置。
class HIHelpEntrance extends StatelessWidget {
const HIHelpEntrance({
super.key,
this.bottom = 40.0,
this.isLight = true,
});
final double bottom;
final bool isLight; // 用于控制主题颜色
@override
Widget build(BuildContext context) {
final Color displayColor = isLight ? Colors.white : Colors.black;
return Positioned(
bottom: bottom,
left: 0,
right: 0,
child: GestureDetector(
onTap: () {
Get.toNamed(Routes.HI_HELP);
},
child: AbsorbPointer(
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
KrLocalImage(
imageName: 'hi-home-logo',
imageType: ImageType.svg,
color: displayColor,
width: 32.w,
height: 32.w,
),
SizedBox(width: 4.w),
Stack(
clipBehavior: Clip.none,
children: [
Padding(
padding: const EdgeInsets.only(bottom: 2.0),
child: Text(
'遇到问题?',
style: TextStyle(
color: displayColor,
fontSize: 16.sp,
fontWeight: FontWeight.w600,
decoration: TextDecoration.none,
),
),
),
Positioned(
left: 0,
right: 0,
bottom: 0,
child: Container(
height: 1.2,
color: displayColor,
),
),
],
),
],
),
),
),
);
}
}