Compare commits
1
Commits
1ecbd7b6b1
...
main
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7272184067 |
@@ -173,7 +173,7 @@ class _EventLine extends StatelessWidget {
|
|||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
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 second = (seconds % 60).toString().padLeft(2, '0');
|
||||||
final playerLabel = '#${playerNumber.toString().padLeft(2, '0')}';
|
final playerLabel = '#${playerNumber.toString().padLeft(2, '0')}';
|
||||||
|
|
||||||
@@ -189,18 +189,17 @@ class _EventLine extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
const SizedBox(width: 8),
|
const SizedBox(width: 8),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 40,
|
width: 52,
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
child: Text(team),
|
child: Text(team),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 12,
|
width: 8,
|
||||||
child: Align(
|
child:const Text('·', textAlign: TextAlign.left),
|
||||||
alignment: Alignment.center,
|
|
||||||
child: const Text('·', textAlign: TextAlign.center),
|
|
||||||
),
|
|
||||||
),
|
),
|
||||||
SizedBox(
|
SizedBox(
|
||||||
width: 42,
|
width: 42,
|
||||||
@@ -209,13 +208,13 @@ class _EventLine extends StatelessWidget {
|
|||||||
child: Text(playerLabel),
|
child: Text(playerLabel),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
SizedBox(
|
// SizedBox(
|
||||||
width: 12,
|
// width: 12,
|
||||||
child: Align(
|
// child: Align(
|
||||||
alignment: Alignment.center,
|
// alignment: Alignment.center,
|
||||||
child: const Text('·', textAlign: TextAlign.center),
|
// child: const Text('·', textAlign: TextAlign.center),
|
||||||
),
|
// ),
|
||||||
),
|
// ),
|
||||||
Expanded(
|
Expanded(
|
||||||
child: Align(
|
child: Align(
|
||||||
alignment: Alignment.centerLeft,
|
alignment: Alignment.centerLeft,
|
||||||
@@ -229,7 +228,7 @@ class _EventLine extends StatelessWidget {
|
|||||||
const SizedBox(width: 4),
|
const SizedBox(width: 4),
|
||||||
Text(
|
Text(
|
||||||
'$minute:$second',
|
'$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 weekday = _weekdayName(parsed.weekday);
|
||||||
final day = parsed.day.toString().padLeft(2, '0');
|
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 year = parsed.year.toString().substring(2);
|
||||||
final hour = parsed.hour.toString().padLeft(2, '0');
|
final hour = parsed.hour.toString().padLeft(2, '0');
|
||||||
final minute = parsed.minute.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';
|
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) {
|
String _weekdayName(int weekday) => switch (weekday) {
|
||||||
DateTime.monday => 'Mon',
|
DateTime.monday => 'Mon',
|
||||||
DateTime.tuesday => 'Tue',
|
DateTime.tuesday => 'Tue',
|
||||||
@@ -327,6 +342,7 @@ String _weekdayName(int weekday) => switch (weekday) {
|
|||||||
_ => 'Unknown',
|
_ => 'Unknown',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
String _goalTypeName(GoalType type) => switch (type) {
|
String _goalTypeName(GoalType type) => switch (type) {
|
||||||
GoalType.fieldGoal => 'Field goal',
|
GoalType.fieldGoal => 'Field goal',
|
||||||
GoalType.shortCorner => 'Short corner',
|
GoalType.shortCorner => 'Short corner',
|
||||||
@@ -340,7 +356,7 @@ String _cardName(CardType type) => switch (type) {
|
|||||||
};
|
};
|
||||||
|
|
||||||
String _cardDurationLabel(int durationSeconds) {
|
String _cardDurationLabel(int durationSeconds) {
|
||||||
final minutes = durationSeconds ~/ 60;
|
final minutes = (durationSeconds ~/ 60).toString().padLeft(2, '0');
|
||||||
final seconds = (durationSeconds % 60).toString().padLeft(2, '0');
|
final seconds = (durationSeconds % 60).toString().padLeft(2, '0');
|
||||||
return '$minutes:$seconds';
|
return '$minutes:$seconds';
|
||||||
}
|
}
|
||||||
Reference in new issue
Block a user