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