mirror of
https://github.com/bggRGjQaUbCoE/PiliPlus.git
synced 2026-06-28 21:30:18 +08:00
opt: simple dialog
This commit is contained in:
@@ -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);
|
||||
},
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user