细节优化
This commit is contained in:
@@ -371,9 +371,61 @@ class _AppFunSettingsPageState extends State<AppFunSettingsPage> {
|
||||
),
|
||||
trailing: Icon(Icons.chevron_right, color: Colors.grey[400]),
|
||||
onTap: () {
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(builder: (context) => const WidgetsPage()),
|
||||
// 显示对话框提示鸿蒙设备设置方法
|
||||
showDialog(
|
||||
context: context,
|
||||
builder: (BuildContext context) {
|
||||
return AlertDialog(
|
||||
title: Row(
|
||||
children: [
|
||||
Icon(Icons.info_outline, color: AppConstants.primaryColor),
|
||||
const SizedBox(width: 8),
|
||||
const Text('桌面卡片设置'),
|
||||
],
|
||||
),
|
||||
content: const Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
crossAxisAlignment: CrossAxisAlignment.start,
|
||||
children: [
|
||||
Text(
|
||||
'鸿蒙设备请在桌面端设置:',
|
||||
style: TextStyle(fontWeight: FontWeight.bold),
|
||||
),
|
||||
SizedBox(height: 8),
|
||||
Text('1. 长按桌面空白处'),
|
||||
Text('2. 选择「情景诗词」卡片'),
|
||||
Text('3. 添加后点击桌面卡片即可设置'),
|
||||
SizedBox(height: 12),
|
||||
Text(
|
||||
'注意:该页面设置对鸿蒙设备不生效',
|
||||
style: TextStyle(color: Colors.orange, fontSize: 12),
|
||||
),
|
||||
],
|
||||
),
|
||||
actions: [
|
||||
TextButton(
|
||||
onPressed: () => Navigator.of(context).pop(),
|
||||
child: const Text('取消'),
|
||||
),
|
||||
ElevatedButton(
|
||||
onPressed: () {
|
||||
Navigator.of(context).pop();
|
||||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => const WidgetsPage(),
|
||||
),
|
||||
);
|
||||
},
|
||||
style: ElevatedButton.styleFrom(
|
||||
backgroundColor: AppConstants.primaryColor,
|
||||
foregroundColor: Colors.white,
|
||||
),
|
||||
child: const Text('仍要进入'),
|
||||
),
|
||||
],
|
||||
);
|
||||
},
|
||||
);
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user