删除打包后带入的本地目录和切换图标功能

This commit is contained in:
谢宇宁
2026-11-09 20:29:13 +07:00
parent b29916a6bb
commit f39c8eef17
45 changed files with 116 additions and 445 deletions
-61
View File
@@ -1,4 +1,3 @@
import 'dart:io';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
@@ -167,66 +166,6 @@ class HomeMinePage extends StatelessWidget {
);
},
),
// iOS 换图标需弹系统弹窗且要预置图标资源,暂不支持,仅 Android 显示该入口
if (!Platform.isIOS) ...[
Padding(
padding: EdgeInsets.only(left: 12, top: 10, right: 12),
child: Row(
children: [
Text(
'设置桌面图标',
style: TextStyle(
color: Color(0xffEFEFEF),
fontSize: 14,
fontWeight: FontWeight.w500),
),
Spacer(),
InkWell(
enableFeedback: false,
onTap: () => logic.changeIcon(0),
child: Text(
'恢复默认',
style: TextStyle(
color: Color(0xff989898),
fontSize: 12,
fontWeight: FontWeight.w400),
),
),
],
),
),
11.sizeBoxH,
SizedBox(
height: 76,
child: ListView.separated(
padding: EdgeInsets.symmetric(horizontal: 16),
scrollDirection: Axis.horizontal,
separatorBuilder: (_, __) => 7.sizeBoxW,
itemCount: logic.iconList.length,
itemBuilder: (BuildContext context, int index) {
final data = logic.iconList[index];
return InkWell(
enableFeedback: false,
onTap: () => logic.changeIcon(index),
child: Column(
children: [
Image.asset(data.image, width: 54),
4.sizeBoxH,
Text(
data.name,
style: TextStyle(
color: Colors.white.withValues(alpha: 0.9),
fontSize: 12,
),
)
],
),
);
},
),
),
10.sizeBoxH,
],
],
),
),