2024-06-14 20:47:36 +00:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:tetra_stats/data_objects/tetrio.dart';
|
|
|
|
import 'package:tetra_stats/gen/strings.g.dart';
|
|
|
|
import 'package:tetra_stats/widgets/singleplayer_record.dart';
|
|
|
|
import 'package:tetra_stats/widgets/text_timestamp.dart';
|
|
|
|
|
|
|
|
class SingleplayerRecordView extends StatelessWidget {
|
|
|
|
final RecordSingle record;
|
|
|
|
|
|
|
|
const SingleplayerRecordView({super.key, required this.record});
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
final t = Translations.of(context);
|
|
|
|
//bool bigScreen = MediaQuery.of(context).size.width >= 368;
|
|
|
|
return Scaffold(
|
|
|
|
backgroundColor: Colors.black,
|
|
|
|
appBar: AppBar(
|
|
|
|
title: Text("${
|
2024-07-27 19:10:45 +00:00
|
|
|
switch (record.gamemode){
|
2024-06-14 20:47:36 +00:00
|
|
|
"40l" => t.sprint,
|
|
|
|
"blitz" => t.blitz,
|
|
|
|
String() => "5000000 Blast",
|
|
|
|
}
|
|
|
|
} ${timestamp(record.timestamp)}"),
|
|
|
|
),
|
|
|
|
body: SafeArea(
|
|
|
|
child: SingleChildScrollView(
|
|
|
|
child: Row(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
|
|
children: [
|
|
|
|
Column(
|
|
|
|
children: [
|
|
|
|
SingleplayerRecord(record: record, hideTitle: true),
|
2024-06-15 22:49:57 +00:00
|
|
|
// TODO: Insert replay link here
|
2024-06-14 20:47:36 +00:00
|
|
|
]
|
|
|
|
)
|
|
|
|
],
|
|
|
|
)
|
|
|
|
)
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|