From 0239c53c047d828493cc46127244853d1e6fcc79 Mon Sep 17 00:00:00 2001 From: LittleSheep Date: Tue, 12 Aug 2025 22:52:52 +0800 Subject: [PATCH] :lipstick: Optimize poll submitted view --- lib/widgets/poll/poll_submit.dart | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/lib/widgets/poll/poll_submit.dart b/lib/widgets/poll/poll_submit.dart index 619679f..6c2018d 100644 --- a/lib/widgets/poll/poll_submit.dart +++ b/lib/widgets/poll/poll_submit.dart @@ -446,21 +446,16 @@ class _PollSubmitState extends ConsumerState { if (widget.initialAnswers != null && !_isModifying && !widget.isReadonly) { // If poll is submitted and not in modification mode, show "Modify" button - return Row( - children: [ - const Spacer(), - FilledButton.icon( - icon: const Icon(Icons.edit), - label: const Text('Modify Answers'), - onPressed: () { - setState(() { - _isModifying = true; - _index = 0; // Reset to first question for modification - _loadCurrentIntoLocalState(); - }); - }, - ), - ], + return FilledButton.icon( + icon: const Icon(Icons.edit), + label: const Text('Modify Answers'), + onPressed: () { + setState(() { + _isModifying = true; + _index = 0; // Reset to first question for modification + _loadCurrentIntoLocalState(); + }); + }, ); } @@ -666,11 +661,7 @@ class _PollSubmitState extends ConsumerState { if (widget.initialAnswers != null && !widget.isReadonly && !_isModifying) { return Column( crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - _buildSubmittedView(context), - const SizedBox(height: 16), - _buildNavBar(context), - ], + children: [_buildSubmittedView(context), _buildNavBar(context)], ); }