fixed finished polls causing errors, made poll list dense
This commit is contained in:
@@ -15,7 +15,6 @@ class PollOptionsList extends StatefulWidget {
|
||||
class _PollOptionsListState extends State<PollOptionsList> {
|
||||
@override
|
||||
Widget build(BuildContext context) => Column(
|
||||
mainAxisSize: MainAxisSize.min,
|
||||
children: [
|
||||
...widget.pollData.options.map<Widget>((option) {
|
||||
var optionId = widget.pollData.options.indexOf(option);
|
||||
@@ -29,6 +28,7 @@ class _PollOptionsListState extends State<PollOptionsList> {
|
||||
return ListTile(
|
||||
enabled: false,
|
||||
isThreeLine: portionsVisible,
|
||||
dense: true,
|
||||
title: Text(
|
||||
option,
|
||||
style: Theme.of(context).textTheme.bodyLarge,
|
||||
@@ -36,12 +36,10 @@ class _PollOptionsListState extends State<PollOptionsList> {
|
||||
trailing: Icon(
|
||||
votedSelf ? Icons.check_circle_outlined : Icons.circle_outlined,
|
||||
color: votedSelf
|
||||
? Theme.of(context).colorScheme.primary.withValues(alpha: 0.8)
|
||||
: Theme.of(context).colorScheme.onSurfaceVariant.withValues(alpha: 0.8),
|
||||
? Theme.of(context).colorScheme.primary.withValues(alpha: 0.6)
|
||||
: Theme.of(context).colorScheme.onSurfaceVariant.withValues(alpha: 0.6),
|
||||
),
|
||||
subtitle: Visibility(
|
||||
visible: portionsVisible,
|
||||
child: Row(
|
||||
subtitle: portionsVisible ? Row(
|
||||
children: [
|
||||
Expanded(
|
||||
child: LinearProgressIndicator(value: portion.clamp(0.0, 1.0)),
|
||||
@@ -51,14 +49,12 @@ class _PollOptionsListState extends State<PollOptionsList> {
|
||||
child: Text('${(portion * 100).round()}%'),
|
||||
),
|
||||
],
|
||||
)
|
||||
)
|
||||
) : null,
|
||||
);
|
||||
}),
|
||||
ListTile(
|
||||
title: Linkify(
|
||||
text: 'Zurzeit kann in dieser App leider nicht abgestimmt werden. '
|
||||
'Verwende dafür die Webversion unter https://cloud.marianum-fulda.de',
|
||||
text: 'Wenn du abstimmen möchtest, verwende die Webversion unter https://cloud.marianum-fulda.de',
|
||||
style: Theme.of(context).textTheme.bodySmall,
|
||||
),
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user