Changed from to buttons design

This commit is contained in:
Juan Gilsanz Polo 2024-01-27 22:04:54 +01:00
parent ad3046a84b
commit 5d45829937
3 changed files with 22 additions and 12 deletions

View file

@ -741,8 +741,8 @@
"friday": "Friday",
"saturday": "Saturday",
"sunday": "Sunday",
"from": "From: {from}",
"to": "To: {to}",
"from": "From",
"to": "To",
"selectStartTime": "Select start time",
"selectEndTime": "Select end time",
"startTimeBeforeEndTime": "Start time must be before end time.",

View file

@ -741,8 +741,8 @@
"friday": "Viernes",
"saturday": "Sábado",
"sunday": "Domingo",
"from": "Desde: {from}",
"to": "Hasta: {to}",
"from": "Desde",
"to": "Hasta",
"selectStartTime": "Seleccionar hora de inicio",
"selectEndTime": "Seleccionar hora de fin",
"startTimeBeforeEndTime": "La hora de inicio debe ser anterior a la hora de fin.",

View file

@ -236,10 +236,15 @@ class _BlockingScheduleModalState extends State<BlockingScheduleModal> {
);
setState(() => _from = selected);
},
child: Text(
AppLocalizations.of(context)!.from(
_from != null ? "${_from!.hour.toString().padLeft(2, '0')}:${_from!.minute.toString().padLeft(2, '0')}" : "--:--"
)
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 4),
child: Column(
children: [
Text(AppLocalizations.of(context)!.from),
const SizedBox(height: 2),
Text(_from != null ? "${_from!.hour.toString().padLeft(2, '0')}:${_from!.minute.toString().padLeft(2, '0')}" : "--:--")
],
),
)
),
ElevatedButton(
@ -252,10 +257,15 @@ class _BlockingScheduleModalState extends State<BlockingScheduleModal> {
);
setState(() => _to = selected);
},
child: Text(
AppLocalizations.of(context)!.to(
_to != null ? "${_to!.hour.toString().padLeft(2, '0')}:${_to!.minute.toString().padLeft(2, '0')}" : "--:--"
)
child: Padding(
padding: const EdgeInsets.symmetric(vertical: 4),
child: Column(
children: [
Text(AppLocalizations.of(context)!.to),
const SizedBox(height: 2),
Text(_to != null ? "${_to!.hour.toString().padLeft(2, '0')}:${_to!.minute.toString().padLeft(2, '0')}" : "--:--")
],
),
)
),
],