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

@@ -64,42 +64,39 @@ void showPgcFollowDialog({
showDialog(
context: context,
builder: (context) => AlertDialog(
builder: (context) => SimpleDialog(
clipBehavior: Clip.hardEdge,
contentPadding: const EdgeInsets.symmetric(vertical: 12),
content: Column(
mainAxisSize: MainAxisSize.min,
children: [
...const [
(followStatus: 3, title: ''),
(followStatus: 2, title: '在看'),
(followStatus: 1, title: '想看'),
].map(
(item) => statusItem(
enabled: followStatus != item.followStatus,
text: item.title,
onTap: () {
Get.back();
onUpdateStatus(item.followStatus);
},
),
),
ListTile(
dense: true,
title: Padding(
padding: const EdgeInsets.only(left: 10),
child: Text(
'取消$type',
style: const TextStyle(fontSize: 14),
),
),
children: [
...const [
(followStatus: 3, title: '看过'),
(followStatus: 2, title: '在看'),
(followStatus: 1, title: ''),
].map(
(item) => statusItem(
enabled: followStatus != item.followStatus,
text: item.title,
onTap: () {
Get.back();
onUpdateStatus(-1);
onUpdateStatus(item.followStatus);
},
),
],
),
),
ListTile(
dense: true,
title: Padding(
padding: const EdgeInsets.only(left: 10),
child: Text(
'取消$type',
style: const TextStyle(fontSize: 14),
),
),
onTap: () {
Get.back();
onUpdateStatus(-1);
},
),
],
),
);
}