From 7272184067b818f7cbcf82b54e62f5c0f626bcff Mon Sep 17 00:00:00 2001 From: kejaro Date: Mon, 28 Sep 2026 19:14:20 +0100 Subject: [PATCH] update --- .../dashboard/views/match_results_view.dart | 50 ++++++++++++------- 1 file changed, 33 insertions(+), 17 deletions(-) diff --git a/mobile_app/lib/ui/features/dashboard/views/match_results_view.dart b/mobile_app/lib/ui/features/dashboard/views/match_results_view.dart index 362ef88..bef985c 100644 --- a/mobile_app/lib/ui/features/dashboard/views/match_results_view.dart +++ b/mobile_app/lib/ui/features/dashboard/views/match_results_view.dart @@ -173,7 +173,7 @@ class _EventLine extends StatelessWidget { @override Widget build(BuildContext context) { - final minute = seconds ~/ 60; + final minute = (seconds ~/ 60).toString().padLeft(2, '0'); final second = (seconds % 60).toString().padLeft(2, '0'); final playerLabel = '#${playerNumber.toString().padLeft(2, '0')}'; @@ -189,18 +189,17 @@ class _EventLine extends StatelessWidget { ), const SizedBox(width: 8), SizedBox( - width: 40, + width: 52, child: Align( alignment: Alignment.centerLeft, child: Text(team), ), ), SizedBox( - width: 12, - child: Align( - alignment: Alignment.center, - child: const Text('·', textAlign: TextAlign.center), - ), + width: 8, + child:const Text('·', textAlign: TextAlign.left), + + ), SizedBox( width: 42, @@ -209,13 +208,13 @@ class _EventLine extends StatelessWidget { child: Text(playerLabel), ), ), - SizedBox( - width: 12, - child: Align( - alignment: Alignment.center, - child: const Text('·', textAlign: TextAlign.center), - ), - ), + // SizedBox( + // width: 12, + // child: Align( + // alignment: Alignment.center, + // child: const Text('·', textAlign: TextAlign.center), + // ), + // ), Expanded( child: Align( alignment: Alignment.centerLeft, @@ -229,7 +228,7 @@ class _EventLine extends StatelessWidget { const SizedBox(width: 4), Text( '$minute:$second', - style: Theme.of(context).textTheme.labelMedium, + // style: Theme.of(context).textTheme.labelMedium, ), ], ), @@ -308,7 +307,7 @@ String _exportDate(String rawDateTime) { final weekday = _weekdayName(parsed.weekday); final day = parsed.day.toString().padLeft(2, '0'); - final month = parsed.month.toString().padLeft(2, '0'); + final month = _monthName(parsed.month); final year = parsed.year.toString().substring(2); final hour = parsed.hour.toString().padLeft(2, '0'); final minute = parsed.minute.toString().padLeft(2, '0'); @@ -316,6 +315,22 @@ String _exportDate(String rawDateTime) { return '$weekday $day-$month-$year $hour:$minute'; } +String _monthName(int month) => switch (month) { + 1 => 'Jan', + 2 => 'Feb', + 3 => 'Mar', + 4 => 'Apr', + 5 => 'May', + 6 => 'Jun', + 7 => 'Jul', + 8 => 'Aug', + 9 => 'Sep', + 10 => 'Oct', + 11 => 'Nov', + 12 => 'Dec', + _ => 'Unknown', +}; + String _weekdayName(int weekday) => switch (weekday) { DateTime.monday => 'Mon', DateTime.tuesday => 'Tue', @@ -327,6 +342,7 @@ String _weekdayName(int weekday) => switch (weekday) { _ => 'Unknown', }; + String _goalTypeName(GoalType type) => switch (type) { GoalType.fieldGoal => 'Field goal', GoalType.shortCorner => 'Short corner', @@ -340,7 +356,7 @@ String _cardName(CardType type) => switch (type) { }; String _cardDurationLabel(int durationSeconds) { - final minutes = durationSeconds ~/ 60; + final minutes = (durationSeconds ~/ 60).toString().padLeft(2, '0'); final seconds = (durationSeconds % 60).toString().padLeft(2, '0'); return '$minutes:$seconds'; }