💄 Optimize poll submitted view

This commit is contained in:
2025-08-12 22:52:52 +08:00
parent 16987c758e
commit 0239c53c04

View File

@@ -446,10 +446,7 @@ class _PollSubmitState extends ConsumerState<PollSubmit> {
if (widget.initialAnswers != null && !_isModifying && !widget.isReadonly) { if (widget.initialAnswers != null && !_isModifying && !widget.isReadonly) {
// If poll is submitted and not in modification mode, show "Modify" button // If poll is submitted and not in modification mode, show "Modify" button
return Row( return FilledButton.icon(
children: [
const Spacer(),
FilledButton.icon(
icon: const Icon(Icons.edit), icon: const Icon(Icons.edit),
label: const Text('Modify Answers'), label: const Text('Modify Answers'),
onPressed: () { onPressed: () {
@@ -459,8 +456,6 @@ class _PollSubmitState extends ConsumerState<PollSubmit> {
_loadCurrentIntoLocalState(); _loadCurrentIntoLocalState();
}); });
}, },
),
],
); );
} }
@@ -666,11 +661,7 @@ class _PollSubmitState extends ConsumerState<PollSubmit> {
if (widget.initialAnswers != null && !widget.isReadonly && !_isModifying) { if (widget.initialAnswers != null && !widget.isReadonly && !_isModifying) {
return Column( return Column(
crossAxisAlignment: CrossAxisAlignment.stretch, crossAxisAlignment: CrossAxisAlignment.stretch,
children: [ children: [_buildSubmittedView(context), _buildNavBar(context)],
_buildSubmittedView(context),
const SizedBox(height: 16),
_buildNavBar(context),
],
); );
} }