refinements

This commit is contained in:
2026-05-25 12:49:04 +02:00
parent aad9a991c2
commit 9b5d19b926
13 changed files with 609 additions and 529 deletions

View File

@@ -133,29 +133,44 @@ class TicketList extends StatelessWidget {
horizontal: 16.0,
vertical: 8.0,
),
child: Row(
// ECCO LA MAGIA: Wrap invece di Row!
child: Wrap(
alignment: WrapAlignment.spaceBetween, // Sostituisce lo Spacer!
crossAxisAlignment: WrapCrossAlignment.center,
spacing: 8.0, // Spazio orizzontale
runSpacing: 8.0, // Spazio verticale se va a capo
children: [
IconButton(
icon: const Icon(Icons.close),
onPressed: () =>
context.read<TicketListCubit>().clearSelection(),
),
Text(
'${state.selectedTickets.length} selezionati',
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
const Spacer(),
// BLOCCO 1: Icona e Contatore
Row(
mainAxisSize: MainAxisSize
.min, // Fondamentale per non occupare tutto il Wrap
children: [
IconButton(
icon: const Icon(Icons.close),
onPressed: () =>
context.read<TicketListCubit>().clearSelection(),
),
Text(
'${state.selectedTickets.length} selezionati',
style: const TextStyle(
fontWeight: FontWeight.bold,
fontSize: 16,
),
),
],
),
// BLOCCO 2: I Bottoni (Un altro Wrap per farli andare a capo tra loro se serve!)
Wrap(
spacing: 8.0,
runSpacing: 8.0,
alignment: WrapAlignment.end,
children: [
FilledButton.icon(
onPressed: () => _setStatusClosed(context),
icon: const Icon(Icons.approval),
label: const Text('Riconsegna'),
),
const SizedBox(width: 8),
FilledButton.icon(
onPressed: () => _showShippingModal(context),
icon: const Icon(Icons.local_shipping),