feat: 增加防丢失页面海报生成

This commit is contained in:
2026-01-12 18:49:07 -08:00
parent 26f6c10557
commit 2e7658c4fd
9 changed files with 82 additions and 96 deletions
@@ -13,18 +13,11 @@ class HIAntiLostView extends GetView<HIAntiLostController> {
@override
Widget build(BuildContext context) {
return HIBaseScaffold(
showBack: true,
title: null,
topContentAreaHeight: 0,
backgroundColor: Colors.black, // Dark background
child: Stack(
fit: StackFit.expand,
children: [
// 1. Visible Content
Column(
children: [
SizedBox(height: 60.h),
// Card Container
Container(
width: double.infinity,
margin: EdgeInsets.symmetric(horizontal: 40.w),
@@ -46,7 +39,7 @@ class HIAntiLostView extends GetView<HIAntiLostController> {
fontWeight: FontWeight.bold,
),
),
SizedBox(height: 25.h),
SizedBox(height: 25.w),
Text(
'建议保存Hi快VPN防丢二维码到相册\n永久保障您的互联网自由',
textAlign: TextAlign.center,
@@ -56,7 +49,7 @@ class HIAntiLostView extends GetView<HIAntiLostController> {
height: 1.5,
),
),
SizedBox(height: 10.h),
SizedBox(height: 10.w),
// QR Code
LayoutBuilder(builder: (context, constraints) {
// Use a reasonable size for the QR code
@@ -76,9 +69,8 @@ class HIAntiLostView extends GetView<HIAntiLostController> {
dataModuleShape: QrDataModuleShape.square,
color: Theme.of(context).primaryColor,
),
// center image
embeddedImage:
const AssetImage('assets/images/kr-logo.png'),
embeddedImage: const AssetImage(
'assets/images/lost-poster-logo-white.png'),
embeddedImageStyle: QrEmbeddedImageStyle(
size: Size(36.w, 36.w),
),
@@ -89,7 +81,7 @@ class HIAntiLostView extends GetView<HIAntiLostController> {
),
),
SizedBox(height: 30.h),
SizedBox(height: 10.w),
// Save Button
GestureDetector(
@@ -101,7 +93,7 @@ class HIAntiLostView extends GetView<HIAntiLostController> {
alignment: Alignment.center,
decoration: BoxDecoration(
color: Theme.of(context).primaryColor,
borderRadius: BorderRadius.circular(22.h),
borderRadius: BorderRadius.circular(22.w),
),
child: Text(
'保存到本地',
@@ -120,7 +112,7 @@ class HIAntiLostView extends GetView<HIAntiLostController> {
// 2. Bottom Button (Follow us on X)
Positioned(
bottom: 40.h,
bottom: 40.w,
left: 0,
right: 0,
child: Center(