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

@@ -159,57 +159,52 @@ class _VotePanelState extends State<VotePanel> {
context: context,
builder: (context) {
final colorScheme = ColorScheme.of(context);
return AlertDialog(
return SimpleDialog(
clipBehavior: .hardEdge,
title: const Text('关注的人的投票'),
contentPadding: const .only(top: 10, bottom: 12),
content: SingleChildScrollView(
child: Column(
mainAxisSize: .min,
children: list
.map(
(e) => ListTile(
dense: true,
onTap: () =>
Get.toNamed('/member?mid=${e.mid}'),
leading: NetworkImgLayer(
src: e.face,
width: 40,
height: 40,
type: .avatar,
),
title: Text.rich(
style: const TextStyle(fontSize: 13),
children: list
.map(
(e) => ListTile(
dense: true,
onTap: () =>
Get.toNamed('/member?mid=${e.mid}'),
leading: NetworkImgLayer(
src: e.face,
width: 40,
height: 40,
type: .avatar,
),
title: Text.rich(
style: const TextStyle(fontSize: 13),
TextSpan(
children: [
TextSpan(text: e.name),
TextSpan(
children: [
TextSpan(text: e.name),
TextSpan(
text: ' 投给了',
style: TextStyle(
fontSize: 12,
color: colorScheme.outline,
),
),
],
text: ' 投给了',
style: TextStyle(
fontSize: 12,
color: colorScheme.outline,
),
),
),
subtitle: Text(
style: const TextStyle(fontSize: 13),
e.votes
.map(
(vote) => _voteInfo.options
.firstWhereOrNull(
(e) => e.optIdx == vote,
)
?.optDesc,
)
.join(''),
),
],
),
)
.toList(),
),
),
),
subtitle: Text(
style: const TextStyle(fontSize: 13),
e.votes
.map(
(vote) => _voteInfo.options
.firstWhereOrNull(
(e) => e.optIdx == vote,
)
?.optDesc,
)
.join(''),
),
),
)
.toList(),
);
},
);