opt: simple dialog

This commit is contained in:
My-Responsitories
2026-06-13 11:58:33 +08:00
parent c63fe3866c
commit 3085d58508
26 changed files with 1184 additions and 1433 deletions

View File

@@ -195,37 +195,32 @@ class _CreateFavPageState extends State<CreateFavPage> {
if (_cover?.isNotEmpty == true) {
showDialog(
context: context,
builder: (_) => AlertDialog(
builder: (_) => SimpleDialog(
clipBehavior: Clip.hardEdge,
contentPadding: const .symmetric(vertical: 12),
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
ListTile(
dense: true,
onTap: () {
Get.back();
_pickImg(context, theme);
},
title: const Text(
'替换封面',
style: TextStyle(fontSize: 14),
),
children: [
SimpleDialogOption(
onPressed: () {
Get.back();
_pickImg(context, theme);
},
child: const Text(
'替换封面',
style: TextStyle(fontSize: 14),
),
ListTile(
dense: true,
onTap: () {
Get.back();
_cover = null;
(context as Element).markNeedsBuild();
},
title: const Text(
'移除封面',
style: TextStyle(fontSize: 14),
),
),
SimpleDialogOption(
onPressed: () {
Get.back();
_cover = null;
(context as Element).markNeedsBuild();
},
child: const Text(
'移除封面',
style: TextStyle(fontSize: 14),
),
],
),
),
],
),
);
} else {