fixed #1 + localized compare, calc, tl match views
+20 stirngs, now 414 for one locale
This commit is contained in:
parent
b9c047cae7
commit
758439f9c4
|
@ -1,9 +1,9 @@
|
|||
/// Generated file. Do not edit.
|
||||
///
|
||||
/// Locales: 2
|
||||
/// Strings: 788 (394 per locale)
|
||||
/// Strings: 828 (414 per locale)
|
||||
///
|
||||
/// Built on 2023-07-12 at 15:22 UTC
|
||||
/// Built on 2023-07-14 at 20:17 UTC
|
||||
|
||||
// coverage:ignore-file
|
||||
// ignore_for_file: type=lint
|
||||
|
@ -177,6 +177,7 @@ class _StringsEn implements BaseTranslations<AppLocale, _StringsEn> {
|
|||
String fetchDate({required Object date}) => 'Fetched ${date}';
|
||||
String get exactGametime => 'Exact gametime';
|
||||
String get bigRedBanned => 'BANNED';
|
||||
String get normalBanned => 'Banned';
|
||||
String get bigRedBadStanding => 'BAD STANDING';
|
||||
String get copiedToClipboard => 'Copied to clipboard!';
|
||||
String get playerRoleAccount => ' account ';
|
||||
|
@ -224,6 +225,23 @@ class _StringsEn implements BaseTranslations<AppLocale, _StringsEn> {
|
|||
String trackedPlayersEntry({required Object nickname, required Object numberOfStates}) => '${nickname}: ${numberOfStates} states';
|
||||
String trackedPlayersDescription({required Object firstStateDate, required Object lastStateDate}) => 'From ${firstStateDate} until ${lastStateDate}';
|
||||
String trackedPlayersStatesDeleted({required Object nickname}) => '${nickname} states was removed from database!';
|
||||
String averageXrank({required Object rankLetter}) => 'Average ${rankLetter} rank';
|
||||
String get vs => 'vs';
|
||||
String get registred => 'Registred';
|
||||
String get playedTL => 'Played Tetra League';
|
||||
String get winChance => 'Win Chance';
|
||||
String get byGlicko => 'By Glicko';
|
||||
String get byEstTR => 'By Est. TR';
|
||||
String get compareViewNoValues => 'Please, enter username, user ID, or APM-PPS-VS values (divider doesn\'t matter, only order matter) to both of fields';
|
||||
String compareViewWrongValue({required Object value}) => 'Falied to assign ${value}';
|
||||
String get mostRecentOne => 'Most recent one';
|
||||
String get yes => 'Yes';
|
||||
String get no => 'No';
|
||||
String get daysLater => 'days later';
|
||||
String get dayseBefore => 'days before';
|
||||
String get fromBeginning => 'From beginning';
|
||||
String get calc => 'Calc';
|
||||
String get calcViewNoValues => 'Enter values to calculate the stats';
|
||||
late final _StringsStatCellNumEn statCellNum = _StringsStatCellNumEn._(_root);
|
||||
Map<String, String> get playerRole => {
|
||||
'user': 'User',
|
||||
|
@ -517,7 +535,9 @@ class _StringsStatCellNumEn {
|
|||
String get apm => 'Attack\nPer Minute';
|
||||
String get vs => 'Versus\nScore';
|
||||
String get lbp => 'Leaderboard\nplacement';
|
||||
String get lbpShort => '№ in LB';
|
||||
String get lbpc => 'Country LB\nplacement';
|
||||
String get lbpcShort => '№ in local LB';
|
||||
String get gamesPlayed => 'Games\nplayed';
|
||||
String get gamesWonTL => 'Games\nWon';
|
||||
String get winrate => 'Winrate\nprecentage';
|
||||
|
@ -535,17 +555,17 @@ class _StringsStatCellNumEn {
|
|||
String get appDescription => '(Abbreviated as APP) Main efficiency metric. Tells how many attack you producing per piece';
|
||||
String get vsapmDescription => 'Basically, tells how much and how efficient you using garbage in your attacks';
|
||||
String get dss => 'Downstack\nPer Second';
|
||||
String get dssDescription => 'Downstack per Second measures how many garbage lines you clear in a second.';
|
||||
String get dssDescription => '(Abbreviated as DS/S) Downstack per Second measures how many garbage lines you clear in a second.';
|
||||
String get dsp => 'Downstack\nPer Piece';
|
||||
String get dspDescription => 'Downstack per Piece measures how many garbage lines you clear per piece.';
|
||||
String get dspDescription => '(Abbreviated as DS/P) Downstack per Piece measures how many garbage lines you clear per piece.';
|
||||
String get appdsp => 'APP + DS/P';
|
||||
String get appdspDescription => 'Just a sum of Attack per Piece and Downstack per Piece.';
|
||||
String get cheese => 'Cheese\nIndex';
|
||||
String get cheeseDescription => 'Cheese Index is an approximation how much clean / cheese garbage player sends. Lower = more clean. Higher = more cheese.\nInvented by kerrmunism';
|
||||
String get cheeseDescription => '(Abbreviated as Cheese) Cheese Index is an approximation how much clean / cheese garbage player sends. Lower = more clean. Higher = more cheese.\nInvented by kerrmunism';
|
||||
String get gbe => 'Garbage\nEfficiency';
|
||||
String get gbeDescription => 'Garbage Efficiency measures how well player uses their garbage. Higher = better or they use their garbage more. Lower = they mostly send their garbage back at cheese or rarely clear garbage.\nInvented by Zepheniah and Dragonboy.';
|
||||
String get gbeDescription => '(Abbreviated as Gb Eff.) Garbage Efficiency measures how well player uses their garbage. Higher = better or they use their garbage more. Lower = they mostly send their garbage back at cheese or rarely clear garbage.\nInvented by Zepheniah and Dragonboy.';
|
||||
String get nyaapp => 'Weighted\nAPP';
|
||||
String get nyaappDescription => 'Essentially, a measure of your ability to send cheese while still maintaining a high APP.\nInvented by Wertj.';
|
||||
String get nyaappDescription => '(Abbreviated as wAPP) Essentially, a measure of your ability to send cheese while still maintaining a high APP.\nInvented by Wertj.';
|
||||
String get area => 'Area';
|
||||
String get areaDescription => 'How much space your shape takes up on the graph, if you exclude the cheese and vs/apm sections';
|
||||
String get estOfTR => 'Est. of TR';
|
||||
|
@ -644,6 +664,7 @@ class _StringsRu implements _StringsEn {
|
|||
@override String fetchDate({required Object date}) => 'На момент ${date}';
|
||||
@override String get exactGametime => 'Время, проведённое в игре';
|
||||
@override String get bigRedBanned => 'ЗАБАНЕН';
|
||||
@override String get normalBanned => 'Забанен';
|
||||
@override String get bigRedBadStanding => 'ПЛОХАЯ РЕПУТАЦИЯ';
|
||||
@override String get copiedToClipboard => 'Скопировано в буфер обмена!';
|
||||
@override String get playerRoleAccount => ', аккаунт которого ';
|
||||
|
@ -691,6 +712,23 @@ class _StringsRu implements _StringsEn {
|
|||
@override String trackedPlayersEntry({required Object nickname, required Object numberOfStates}) => '${nickname}: ${numberOfStates} состояний';
|
||||
@override String trackedPlayersDescription({required Object firstStateDate, required Object lastStateDate}) => 'Начиная с ${firstStateDate} и заканчивая ${lastStateDate}';
|
||||
@override String trackedPlayersStatesDeleted({required Object nickname}) => 'Состояния аккаунта ${nickname} были удалены из локальной базы данных!';
|
||||
@override String averageXrank({required Object rankLetter}) => 'Средний ${rankLetter} ранг';
|
||||
@override String get vs => 'против';
|
||||
@override String get registred => 'Зарегистрирован';
|
||||
@override String get playedTL => 'Играл в Тетра Лигу';
|
||||
@override String get winChance => 'Шансы на победу';
|
||||
@override String get byGlicko => 'По Glicko';
|
||||
@override String get byEstTR => 'По расч. TR';
|
||||
@override String get compareViewNoValues => 'Пожалуйста, введите никнейм, ID или значения APM-PPS-VS (неважно, какой разделитель, важен порядок) в оба поля';
|
||||
@override String compareViewWrongValue({required Object value}) => 'Не удалось получить ${value}';
|
||||
@override String get mostRecentOne => 'Самый последний';
|
||||
@override String get yes => 'Да';
|
||||
@override String get no => 'Нет';
|
||||
@override String get daysLater => 'дней позже';
|
||||
@override String get dayseBefore => 'дней до';
|
||||
@override String get fromBeginning => 'С начала';
|
||||
@override String get calc => 'Считать';
|
||||
@override String get calcViewNoValues => 'Введите значения, чтобы посчитать статистику';
|
||||
@override late final _StringsStatCellNumRu statCellNum = _StringsStatCellNumRu._(_root);
|
||||
@override Map<String, String> get playerRole => {
|
||||
'user': 'Пользователь',
|
||||
|
@ -984,7 +1022,9 @@ class _StringsStatCellNumRu implements _StringsStatCellNumEn {
|
|||
@override String get apm => 'Атака в\nМинуту';
|
||||
@override String get vs => 'Показатель\nVersus';
|
||||
@override String get lbp => 'Положение\nв рейтинге';
|
||||
@override String get lbpShort => '№ в рейтинге';
|
||||
@override String get lbpc => 'Положение\nв рейтинге страны';
|
||||
@override String get lbpcShort => '№ по стране';
|
||||
@override String get gamesPlayed => 'Игр\nСыграно';
|
||||
@override String get gamesWonTL => 'Побед';
|
||||
@override String get winrate => 'Процент\nпобед';
|
||||
|
@ -1090,6 +1130,7 @@ extension on _StringsEn {
|
|||
case 'fetchDate': return ({required Object date}) => 'Fetched ${date}';
|
||||
case 'exactGametime': return 'Exact gametime';
|
||||
case 'bigRedBanned': return 'BANNED';
|
||||
case 'normalBanned': return 'Banned';
|
||||
case 'bigRedBadStanding': return 'BAD STANDING';
|
||||
case 'copiedToClipboard': return 'Copied to clipboard!';
|
||||
case 'playerRoleAccount': return ' account ';
|
||||
|
@ -1137,6 +1178,23 @@ extension on _StringsEn {
|
|||
case 'trackedPlayersEntry': return ({required Object nickname, required Object numberOfStates}) => '${nickname}: ${numberOfStates} states';
|
||||
case 'trackedPlayersDescription': return ({required Object firstStateDate, required Object lastStateDate}) => 'From ${firstStateDate} until ${lastStateDate}';
|
||||
case 'trackedPlayersStatesDeleted': return ({required Object nickname}) => '${nickname} states was removed from database!';
|
||||
case 'averageXrank': return ({required Object rankLetter}) => 'Average ${rankLetter} rank';
|
||||
case 'vs': return 'vs';
|
||||
case 'registred': return 'Registred';
|
||||
case 'playedTL': return 'Played Tetra League';
|
||||
case 'winChance': return 'Win Chance';
|
||||
case 'byGlicko': return 'By Glicko';
|
||||
case 'byEstTR': return 'By Est. TR';
|
||||
case 'compareViewNoValues': return 'Please, enter username, user ID, or APM-PPS-VS values (divider doesn\'t matter, only order matter) to both of fields';
|
||||
case 'compareViewWrongValue': return ({required Object value}) => 'Falied to assign ${value}';
|
||||
case 'mostRecentOne': return 'Most recent one';
|
||||
case 'yes': return 'Yes';
|
||||
case 'no': return 'No';
|
||||
case 'daysLater': return 'days later';
|
||||
case 'dayseBefore': return 'days before';
|
||||
case 'fromBeginning': return 'From beginning';
|
||||
case 'calc': return 'Calc';
|
||||
case 'calcViewNoValues': return 'Enter values to calculate the stats';
|
||||
case 'statCellNum.xpLevel': return 'XP Level';
|
||||
case 'statCellNum.xpProgress': return 'Progress to next level';
|
||||
case 'statCellNum.xpFrom0To5000': return 'Progress from 0 XP to level 5000';
|
||||
|
@ -1147,7 +1205,9 @@ extension on _StringsEn {
|
|||
case 'statCellNum.apm': return 'Attack\nPer Minute';
|
||||
case 'statCellNum.vs': return 'Versus\nScore';
|
||||
case 'statCellNum.lbp': return 'Leaderboard\nplacement';
|
||||
case 'statCellNum.lbpShort': return '№ in LB';
|
||||
case 'statCellNum.lbpc': return 'Country LB\nplacement';
|
||||
case 'statCellNum.lbpcShort': return '№ in local LB';
|
||||
case 'statCellNum.gamesPlayed': return 'Games\nplayed';
|
||||
case 'statCellNum.gamesWonTL': return 'Games\nWon';
|
||||
case 'statCellNum.winrate': return 'Winrate\nprecentage';
|
||||
|
@ -1165,17 +1225,17 @@ extension on _StringsEn {
|
|||
case 'statCellNum.appDescription': return '(Abbreviated as APP) Main efficiency metric. Tells how many attack you producing per piece';
|
||||
case 'statCellNum.vsapmDescription': return 'Basically, tells how much and how efficient you using garbage in your attacks';
|
||||
case 'statCellNum.dss': return 'Downstack\nPer Second';
|
||||
case 'statCellNum.dssDescription': return 'Downstack per Second measures how many garbage lines you clear in a second.';
|
||||
case 'statCellNum.dssDescription': return '(Abbreviated as DS/S) Downstack per Second measures how many garbage lines you clear in a second.';
|
||||
case 'statCellNum.dsp': return 'Downstack\nPer Piece';
|
||||
case 'statCellNum.dspDescription': return 'Downstack per Piece measures how many garbage lines you clear per piece.';
|
||||
case 'statCellNum.dspDescription': return '(Abbreviated as DS/P) Downstack per Piece measures how many garbage lines you clear per piece.';
|
||||
case 'statCellNum.appdsp': return 'APP + DS/P';
|
||||
case 'statCellNum.appdspDescription': return 'Just a sum of Attack per Piece and Downstack per Piece.';
|
||||
case 'statCellNum.cheese': return 'Cheese\nIndex';
|
||||
case 'statCellNum.cheeseDescription': return 'Cheese Index is an approximation how much clean / cheese garbage player sends. Lower = more clean. Higher = more cheese.\nInvented by kerrmunism';
|
||||
case 'statCellNum.cheeseDescription': return '(Abbreviated as Cheese) Cheese Index is an approximation how much clean / cheese garbage player sends. Lower = more clean. Higher = more cheese.\nInvented by kerrmunism';
|
||||
case 'statCellNum.gbe': return 'Garbage\nEfficiency';
|
||||
case 'statCellNum.gbeDescription': return 'Garbage Efficiency measures how well player uses their garbage. Higher = better or they use their garbage more. Lower = they mostly send their garbage back at cheese or rarely clear garbage.\nInvented by Zepheniah and Dragonboy.';
|
||||
case 'statCellNum.gbeDescription': return '(Abbreviated as Gb Eff.) Garbage Efficiency measures how well player uses their garbage. Higher = better or they use their garbage more. Lower = they mostly send their garbage back at cheese or rarely clear garbage.\nInvented by Zepheniah and Dragonboy.';
|
||||
case 'statCellNum.nyaapp': return 'Weighted\nAPP';
|
||||
case 'statCellNum.nyaappDescription': return 'Essentially, a measure of your ability to send cheese while still maintaining a high APP.\nInvented by Wertj.';
|
||||
case 'statCellNum.nyaappDescription': return '(Abbreviated as wAPP) Essentially, a measure of your ability to send cheese while still maintaining a high APP.\nInvented by Wertj.';
|
||||
case 'statCellNum.area': return 'Area';
|
||||
case 'statCellNum.areaDescription': return 'How much space your shape takes up on the graph, if you exclude the cheese and vs/apm sections';
|
||||
case 'statCellNum.estOfTR': return 'Est. of TR';
|
||||
|
@ -1492,6 +1552,7 @@ extension on _StringsRu {
|
|||
case 'fetchDate': return ({required Object date}) => 'На момент ${date}';
|
||||
case 'exactGametime': return 'Время, проведённое в игре';
|
||||
case 'bigRedBanned': return 'ЗАБАНЕН';
|
||||
case 'normalBanned': return 'Забанен';
|
||||
case 'bigRedBadStanding': return 'ПЛОХАЯ РЕПУТАЦИЯ';
|
||||
case 'copiedToClipboard': return 'Скопировано в буфер обмена!';
|
||||
case 'playerRoleAccount': return ', аккаунт которого ';
|
||||
|
@ -1539,6 +1600,23 @@ extension on _StringsRu {
|
|||
case 'trackedPlayersEntry': return ({required Object nickname, required Object numberOfStates}) => '${nickname}: ${numberOfStates} состояний';
|
||||
case 'trackedPlayersDescription': return ({required Object firstStateDate, required Object lastStateDate}) => 'Начиная с ${firstStateDate} и заканчивая ${lastStateDate}';
|
||||
case 'trackedPlayersStatesDeleted': return ({required Object nickname}) => 'Состояния аккаунта ${nickname} были удалены из локальной базы данных!';
|
||||
case 'averageXrank': return ({required Object rankLetter}) => 'Средний ${rankLetter} ранг';
|
||||
case 'vs': return 'против';
|
||||
case 'registred': return 'Зарегистрирован';
|
||||
case 'playedTL': return 'Играл в Тетра Лигу';
|
||||
case 'winChance': return 'Шансы на победу';
|
||||
case 'byGlicko': return 'По Glicko';
|
||||
case 'byEstTR': return 'По расч. TR';
|
||||
case 'compareViewNoValues': return 'Пожалуйста, введите никнейм, ID или значения APM-PPS-VS (неважно, какой разделитель, важен порядок) в оба поля';
|
||||
case 'compareViewWrongValue': return ({required Object value}) => 'Не удалось получить ${value}';
|
||||
case 'mostRecentOne': return 'Самый последний';
|
||||
case 'yes': return 'Да';
|
||||
case 'no': return 'Нет';
|
||||
case 'daysLater': return 'дней позже';
|
||||
case 'dayseBefore': return 'дней до';
|
||||
case 'fromBeginning': return 'С начала';
|
||||
case 'calc': return 'Считать';
|
||||
case 'calcViewNoValues': return 'Введите значения, чтобы посчитать статистику';
|
||||
case 'statCellNum.xpLevel': return 'Уровень\nопыта';
|
||||
case 'statCellNum.xpProgress': return 'Прогресс до следующего уровня';
|
||||
case 'statCellNum.xpFrom0To5000': return 'Прогресс от 0 XP до 5000 уровня';
|
||||
|
@ -1549,7 +1627,9 @@ extension on _StringsRu {
|
|||
case 'statCellNum.apm': return 'Атака в\nМинуту';
|
||||
case 'statCellNum.vs': return 'Показатель\nVersus';
|
||||
case 'statCellNum.lbp': return 'Положение\nв рейтинге';
|
||||
case 'statCellNum.lbpShort': return '№ в рейтинге';
|
||||
case 'statCellNum.lbpc': return 'Положение\nв рейтинге страны';
|
||||
case 'statCellNum.lbpcShort': return '№ по стране';
|
||||
case 'statCellNum.gamesPlayed': return 'Игр\nСыграно';
|
||||
case 'statCellNum.gamesWonTL': return 'Побед';
|
||||
case 'statCellNum.winrate': return 'Процент\nпобед';
|
||||
|
|
|
@ -2,6 +2,7 @@ import 'package:fl_chart/fl_chart.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:tetra_stats/data_objects/tetrio.dart';
|
||||
import 'package:tetra_stats/gen/strings.g.dart';
|
||||
|
||||
double? apm;
|
||||
double? pps;
|
||||
|
@ -50,9 +51,10 @@ class CalcState extends State<CalcView> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final t = Translations.of(context);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: const Text("Stats Calculator"),
|
||||
title: Text(t.statsCalc),
|
||||
),
|
||||
backgroundColor: Colors.black,
|
||||
body: SafeArea(
|
||||
|
@ -94,7 +96,7 @@ class CalcState extends State<CalcView> {
|
|||
)),
|
||||
TextButton(
|
||||
onPressed: () => calc(),
|
||||
child: const Text("Calc"),
|
||||
child: Text(t.calc),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
@ -106,19 +108,19 @@ class CalcState extends State<CalcView> {
|
|||
];
|
||||
},
|
||||
body: nerdStats == null
|
||||
? const Text("Enter values to calculate the stats")
|
||||
? Text(t.calcViewNoValues)
|
||||
: ListView(
|
||||
children: [
|
||||
_ListEntry(value: nerdStats!.app, label: "Attack Per Piece", fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.app, label: t.statCellNum.app.replaceAll(RegExp(r'\n'), " "), fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.vsapm, label: "VS/APM", fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.dss, label: "Downstack Per Second", fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.dsp, label: "Downstack Per Piece", fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.dss, label: t.statCellNum.dss.replaceAll(RegExp(r'\n'), " "), fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.dsp, label: t.statCellNum.dsp.replaceAll(RegExp(r'\n'), " "), fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.appdsp, label: "APP + DS/P", fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.cheese, label: "Cheese Index", fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.gbe, label: "Garbage Efficiency", fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.nyaapp, label: "Weighted APP", fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.area, label: "Area", fractionDigits: 3),
|
||||
_ListEntry(value: estTr!.esttr, label: "Est. of TR", fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.cheese, label: t.statCellNum.cheese.replaceAll(RegExp(r'\n'), " "), fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.gbe, label: t.statCellNum.gbe.replaceAll(RegExp(r'\n'), " "), fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.nyaapp, label: t.statCellNum.nyaapp.replaceAll(RegExp(r'\n'), " "), fractionDigits: 3),
|
||||
_ListEntry(value: nerdStats!.area, label: t.statCellNum.area.replaceAll(RegExp(r'\n'), " "), fractionDigits: 3),
|
||||
_ListEntry(value: estTr!.esttr, label: t.statCellNum.estOfTR, fractionDigits: 3),
|
||||
Wrap(
|
||||
direction: Axis.horizontal,
|
||||
alignment: WrapAlignment.spaceAround,
|
||||
|
|
|
@ -4,6 +4,7 @@ import 'package:flutter/foundation.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:tetra_stats/data_objects/tetrio.dart';
|
||||
import 'package:tetra_stats/gen/strings.g.dart';
|
||||
import 'package:tetra_stats/services/tetrio_crud.dart';
|
||||
|
||||
enum Mode{
|
||||
|
@ -16,7 +17,7 @@ List<dynamic> theGreenSide = [null, null, null]; // TetrioPlayer?, List<Dropdown
|
|||
Mode redSideMode = Mode.player;
|
||||
List<dynamic> theRedSide = [null, null, null];
|
||||
final TetrioService teto = TetrioService();
|
||||
final DateFormat dateFormat = DateFormat.yMd().add_Hm();
|
||||
final DateFormat dateFormat = DateFormat.yMd(LocaleSettings.currentLocale.languageCode).add_Hm();
|
||||
// ignore: unnecessary_string_escapes
|
||||
var numbersReg = RegExp(r'\d+(\.\d*)*');
|
||||
|
||||
|
@ -63,7 +64,7 @@ class CompareState extends State<CompareView> {
|
|||
return setState(() {});
|
||||
}on Exception {
|
||||
ScaffoldMessenger.of(context)
|
||||
.showSnackBar(SnackBar(content: Text("Falied to assign $user")));
|
||||
.showSnackBar(SnackBar(content: Text(t.compareViewWrongValue(value: user))));
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@ -108,9 +109,9 @@ class CompareState extends State<CompareView> {
|
|||
}
|
||||
dStates.firstWhere((element) => element.value == player, orElse: () {
|
||||
dStates?.add(DropdownMenuItem<TetrioPlayer>(
|
||||
value: player, child: const Text("Most recent one")));
|
||||
value: player, child: Text(t.mostRecentOne)));
|
||||
return DropdownMenuItem<TetrioPlayer>(
|
||||
value: player, child: const Text("Most recent one"));
|
||||
value: player, child: Text(t.mostRecentOne));
|
||||
},);
|
||||
}on Exception {
|
||||
dStates = null;
|
||||
|
@ -118,7 +119,7 @@ class CompareState extends State<CompareView> {
|
|||
theRedSide = [player, dStates, player.tlSeason1];
|
||||
} on Exception {
|
||||
ScaffoldMessenger.of(context)
|
||||
.showSnackBar(SnackBar(content: Text("Falied to assign $user")));
|
||||
.showSnackBar(SnackBar(content: Text(t.compareViewWrongValue(value: user))));
|
||||
}
|
||||
_justUpdate();
|
||||
}
|
||||
|
@ -183,9 +184,9 @@ class CompareState extends State<CompareView> {
|
|||
}
|
||||
dStates.firstWhere((element) => element.value == player, orElse: () {
|
||||
dStates?.add(DropdownMenuItem<TetrioPlayer>(
|
||||
value: player, child: const Text("Most recent one")));
|
||||
value: player, child: Text(t.mostRecentOne)));
|
||||
return DropdownMenuItem<TetrioPlayer>(
|
||||
value: player, child: const Text("Most recent one"));
|
||||
value: player, child: Text(t.mostRecentOne));
|
||||
},);
|
||||
}on Exception {
|
||||
dStates = null;
|
||||
|
@ -224,6 +225,7 @@ class CompareState extends State<CompareView> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final t = Translations.of(context);
|
||||
bool bigScreen = MediaQuery.of(context).size.width > 768;
|
||||
String titleGreenSide;
|
||||
String titleRedSide;
|
||||
|
@ -235,7 +237,7 @@ class CompareState extends State<CompareView> {
|
|||
titleGreenSide = "${theGreenSide[2].apm} APM, ${theGreenSide[2].pps} PPS, ${theGreenSide[2].vs} VS";
|
||||
break;
|
||||
case Mode.averages:
|
||||
titleGreenSide = "Average ${theGreenSide[2].rank.toUpperCase()} rank";
|
||||
titleGreenSide = t.averageXrank(rankLetter: theGreenSide[2].rank.toUpperCase());
|
||||
break;
|
||||
}
|
||||
switch (redSideMode){
|
||||
|
@ -246,11 +248,11 @@ class CompareState extends State<CompareView> {
|
|||
titleRedSide = "${theRedSide[2].apm} APM, ${theRedSide[2].pps} PPS, ${theRedSide[2].vs} VS";
|
||||
break;
|
||||
case Mode.averages:
|
||||
titleRedSide = "Average ${theRedSide[2].rank.toUpperCase()} rank";
|
||||
titleRedSide = t.averageXrank(rankLetter: theRedSide[2].rank.toUpperCase());;
|
||||
break;
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text("$titleGreenSide vs $titleRedSide")),
|
||||
appBar: AppBar(title: Text("$titleGreenSide ${t.vs} $titleRedSide")),
|
||||
backgroundColor: Colors.black,
|
||||
body: SafeArea(
|
||||
child: NestedScrollView(
|
||||
|
@ -330,9 +332,9 @@ class CompareState extends State<CompareView> {
|
|||
CompareRegTimeThingy(
|
||||
greenSide: theGreenSide[0].registrationTime,
|
||||
redSide: theRedSide[0].registrationTime,
|
||||
label: "Registred"),
|
||||
label: t.registred),
|
||||
CompareThingy(
|
||||
label: "Level",
|
||||
label: t.statCellNum.level,
|
||||
greenSide: theGreenSide[0].level,
|
||||
redSide: theRedSide[0].level,
|
||||
higherIsBetter: true,
|
||||
|
@ -349,14 +351,14 @@ class CompareState extends State<CompareView> {
|
|||
1000000 /
|
||||
60 /
|
||||
60,
|
||||
label: "Hours Played",
|
||||
label: t.statCellNum.hoursPlayed.replaceAll(RegExp(r'\n'), " "),
|
||||
higherIsBetter: true,
|
||||
fractionDigits: 2,
|
||||
),
|
||||
if (theGreenSide[0].gamesPlayed >= 0 &&
|
||||
theRedSide[0].gamesPlayed >= 0)
|
||||
CompareThingy(
|
||||
label: "Online Games",
|
||||
label: t.statCellNum.onlineGames.replaceAll(RegExp(r'\n'), " "),
|
||||
greenSide: theGreenSide[0].gamesPlayed,
|
||||
redSide: theRedSide[0].gamesPlayed,
|
||||
higherIsBetter: true,
|
||||
|
@ -364,13 +366,13 @@ class CompareState extends State<CompareView> {
|
|||
if (theGreenSide[0].gamesWon >= 0 &&
|
||||
theRedSide[0].gamesWon >= 0)
|
||||
CompareThingy(
|
||||
label: "Games Won",
|
||||
label: t.statCellNum.gamesWon.replaceAll(RegExp(r'\n'), " "),
|
||||
greenSide: theGreenSide[0].gamesWon,
|
||||
redSide: theRedSide[0].gamesWon,
|
||||
higherIsBetter: true,
|
||||
),
|
||||
CompareThingy(
|
||||
label: "Friends",
|
||||
label: t.statCellNum.friends,
|
||||
greenSide: theGreenSide[0].friendCount,
|
||||
redSide: theRedSide[0].friendCount,
|
||||
higherIsBetter: true,
|
||||
|
@ -385,7 +387,7 @@ class CompareState extends State<CompareView> {
|
|||
CompareBoolThingy(
|
||||
greenSide: theGreenSide[0].role == "banned",
|
||||
redSide: theRedSide[0].role == "banned",
|
||||
label: "Banned",
|
||||
label: t.normalBanned,
|
||||
trueIsBetter: false),
|
||||
(theGreenSide[2].gamesPlayed > 0 || greenSideMode == Mode.stats) &&
|
||||
(theRedSide[2].gamesPlayed > 0 || redSideMode == Mode.stats)
|
||||
|
@ -393,7 +395,7 @@ class CompareState extends State<CompareView> {
|
|||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 16),
|
||||
child: Text("Tetra League",
|
||||
child: Text(t.tetraLeague,
|
||||
style: TextStyle(
|
||||
fontFamily: "Eurostile Round Extended",
|
||||
fontSize: bigScreen ? 42 : 28)),
|
||||
|
@ -412,7 +414,7 @@ class CompareState extends State<CompareView> {
|
|||
if (greenSideMode != Mode.stats &&
|
||||
redSideMode != Mode.stats)
|
||||
CompareThingy(
|
||||
label: "Games Played",
|
||||
label: t.statCellNum.gamesPlayed.replaceAll(RegExp(r'\n'), " "),
|
||||
greenSide: theGreenSide[2].gamesPlayed,
|
||||
redSide: theRedSide[2].gamesPlayed,
|
||||
higherIsBetter: true,
|
||||
|
@ -420,7 +422,7 @@ class CompareState extends State<CompareView> {
|
|||
if (greenSideMode != Mode.stats &&
|
||||
redSideMode != Mode.stats)
|
||||
CompareThingy(
|
||||
label: "Games Won",
|
||||
label: t.statCellNum.gamesWonTL.replaceAll(RegExp(r'\n'), " "),
|
||||
greenSide: theGreenSide[2].gamesWon,
|
||||
redSide: theRedSide[2].gamesWon,
|
||||
higherIsBetter: true,
|
||||
|
@ -462,7 +464,7 @@ class CompareState extends State<CompareView> {
|
|||
greenSideMode == Mode.player &&
|
||||
redSideMode == Mode.player)
|
||||
CompareThingy(
|
||||
label: "№ in LB",
|
||||
label: t.statCellNum.lbpShort,
|
||||
greenSide: theGreenSide[2].standing,
|
||||
redSide: theRedSide[2].standing,
|
||||
higherIsBetter: false,
|
||||
|
@ -472,7 +474,7 @@ class CompareState extends State<CompareView> {
|
|||
greenSideMode == Mode.player &&
|
||||
redSideMode == Mode.player)
|
||||
CompareThingy(
|
||||
label: "№ in local LB",
|
||||
label: t.statCellNum.lbpcShort,
|
||||
greenSide:
|
||||
theGreenSide[2].standingLocal,
|
||||
redSide: theRedSide[2].standingLocal,
|
||||
|
@ -510,7 +512,7 @@ class CompareState extends State<CompareView> {
|
|||
: CompareBoolThingy(
|
||||
greenSide: theGreenSide[2].gamesPlayed > 0,
|
||||
redSide: theRedSide[2].gamesPlayed > 0,
|
||||
label: "Played Tetra League",
|
||||
label: t.playedTL,
|
||||
trueIsBetter: false),
|
||||
const Divider(),
|
||||
if (theGreenSide[2].nerdStats != null &&
|
||||
|
@ -519,7 +521,7 @@ class CompareState extends State<CompareView> {
|
|||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 16),
|
||||
child: Text("Nerd Stats",
|
||||
child: Text(t.nerdStats,
|
||||
style: TextStyle(
|
||||
fontFamily: "Eurostile Round Extended",
|
||||
fontSize: bigScreen ? 42 : 28)),
|
||||
|
@ -561,7 +563,7 @@ class CompareState extends State<CompareView> {
|
|||
higherIsBetter: true,
|
||||
),
|
||||
CompareThingy(
|
||||
label: "Cheese",
|
||||
label: t.statCellNum.cheese.replaceAll(RegExp(r'\n'), " "),
|
||||
greenSide:
|
||||
theGreenSide[2].nerdStats!.cheese,
|
||||
redSide: theRedSide[2].nerdStats!.cheese,
|
||||
|
@ -569,14 +571,14 @@ class CompareState extends State<CompareView> {
|
|||
higherIsBetter: true,
|
||||
),
|
||||
CompareThingy(
|
||||
label: "Garbage Eff.",
|
||||
label: "Gb Eff.",
|
||||
greenSide: theGreenSide[2].nerdStats!.gbe,
|
||||
redSide: theRedSide[2].nerdStats!.gbe,
|
||||
fractionDigits: 3,
|
||||
higherIsBetter: true,
|
||||
),
|
||||
CompareThingy(
|
||||
label: "Weighted APP",
|
||||
label: "wAPP",
|
||||
greenSide:
|
||||
theGreenSide[2].nerdStats!.nyaapp,
|
||||
redSide: theRedSide[2].nerdStats!.nyaapp,
|
||||
|
@ -591,7 +593,7 @@ class CompareState extends State<CompareView> {
|
|||
higherIsBetter: true,
|
||||
),
|
||||
CompareThingy(
|
||||
label: "Est. of TR",
|
||||
label: t.statCellNum.estOfTR,
|
||||
greenSide: theGreenSide[2].estTr!.esttr,
|
||||
redSide: theRedSide[2].estTr!.esttr,
|
||||
fractionDigits: 2,
|
||||
|
@ -602,7 +604,7 @@ class CompareState extends State<CompareView> {
|
|||
greenSideMode != Mode.stats &&
|
||||
redSideMode != Mode.stats)
|
||||
CompareThingy(
|
||||
label: "Acc. of Est.",
|
||||
label: t.statCellNum.accOfEst,
|
||||
greenSide: theGreenSide[2].esttracc!,
|
||||
redSide: theRedSide[2].esttracc!,
|
||||
fractionDigits: 2,
|
||||
|
@ -800,7 +802,7 @@ class CompareState extends State<CompareView> {
|
|||
const Divider(),
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 16),
|
||||
child: Text("Win Chance",
|
||||
child: Text(t.winChance,
|
||||
style: TextStyle(
|
||||
fontFamily: "Eurostile Round Extended",
|
||||
fontSize: bigScreen ? 42 : 28)),
|
||||
|
@ -808,7 +810,7 @@ class CompareState extends State<CompareView> {
|
|||
if (greenSideMode != Mode.stats && redSideMode != Mode.stats &&
|
||||
theGreenSide[2].gamesPlayed > 9 && theRedSide[2].gamesPlayed > 9)
|
||||
CompareThingy(
|
||||
label: "By Glicko",
|
||||
label: t.byGlicko,
|
||||
greenSide: getWinrateByTR(
|
||||
theGreenSide[2].glicko!,
|
||||
theGreenSide[2].rd!,
|
||||
|
@ -825,7 +827,7 @@ class CompareState extends State<CompareView> {
|
|||
higherIsBetter: true,
|
||||
),
|
||||
CompareThingy(
|
||||
label: "By Est. TR",
|
||||
label: t.byEstTR,
|
||||
greenSide: getWinrateByTR(
|
||||
theGreenSide[2].estTr!.estglicko,
|
||||
theGreenSide[2].rd ?? noTrRd,
|
||||
|
@ -845,7 +847,7 @@ class CompareState extends State<CompareView> {
|
|||
)
|
||||
],
|
||||
)
|
||||
] : [const Text("Please, enter username, user ID, or APM-PPS-VS values (divider doesn't matter) to both of fields")],
|
||||
] : [Text(t.compareViewNoValues)],
|
||||
)
|
||||
),
|
||||
),
|
||||
|
@ -893,7 +895,7 @@ class PlayerSelector extends StatelessWidget {
|
|||
underFieldString = "${data[2].apm} APM, ${data[2].pps} PPS, ${data[2].vs} VS";
|
||||
break;
|
||||
case Mode.averages:
|
||||
underFieldString = "Average ${data[2].rank.toUpperCase()} rank";
|
||||
underFieldString = t.averageXrank(rankLetter: data[2].rank.toUpperCase());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1105,7 +1107,7 @@ class CompareBoolThingy extends StatelessWidget {
|
|||
],
|
||||
)),
|
||||
child: Text(
|
||||
greenSide ? "Yes" : "No",
|
||||
greenSide ? t.yes : t.no,
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
shadows: <Shadow>[
|
||||
|
@ -1158,7 +1160,7 @@ class CompareBoolThingy extends StatelessWidget {
|
|||
],
|
||||
)),
|
||||
child: Text(
|
||||
redSide ? "Yes" : "No",
|
||||
redSide ? t.yes : t.no,
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
shadows: <Shadow>[
|
||||
|
@ -1266,7 +1268,7 @@ class CompareRegTimeThingy extends StatelessWidget {
|
|||
this.fractionDigits});
|
||||
|
||||
String verdict(DateTime? greenSide, DateTime? redSide) {
|
||||
var f = NumberFormat("#,### days later;#,### days before");
|
||||
var f = NumberFormat("#,### ${t.daysLater};#,### ${t.dayseBefore}");
|
||||
String result = "---";
|
||||
if (greenSide != null && redSide != null) {
|
||||
result = f.format(greenSide.difference(redSide).inDays);
|
||||
|
@ -1300,7 +1302,7 @@ class CompareRegTimeThingy extends StatelessWidget {
|
|||
],
|
||||
)),
|
||||
child: Text(
|
||||
greenSide != null ? f.format(greenSide!) : "From beginning",
|
||||
greenSide != null ? f.format(greenSide!) : t.fromBeginning,
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
shadows: <Shadow>[
|
||||
|
@ -1351,7 +1353,7 @@ class CompareRegTimeThingy extends StatelessWidget {
|
|||
],
|
||||
)),
|
||||
child: Text(
|
||||
redSide != null ? f.format(redSide!) : "From beginning",
|
||||
redSide != null ? f.format(redSide!) : t.fromBeginning,
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
shadows: <Shadow>[
|
||||
|
|
|
@ -2,9 +2,10 @@ import 'package:fl_chart/fl_chart.dart';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:tetra_stats/data_objects/tetrio.dart';
|
||||
import 'package:tetra_stats/gen/strings.g.dart';
|
||||
|
||||
|
||||
final DateFormat dateFormat = DateFormat.yMMMd().add_Hms();
|
||||
final DateFormat dateFormat = DateFormat.yMMMd(LocaleSettings.currentLocale.languageCode).add_Hms();
|
||||
|
||||
class TlMatchResultView extends StatefulWidget {
|
||||
final TetraLeagueAlphaRecord record;
|
||||
|
@ -27,11 +28,12 @@ class TlMatchResultState extends State<TlMatchResultView> {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final t = Translations.of(context);
|
||||
bool bigScreen = MediaQuery.of(context).size.width > 768;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
title: Text(
|
||||
"${widget.record.endContext.firstWhere((element) => element.userId == widget.initPlayerId).username.toUpperCase()} vs. ${widget.record.endContext.firstWhere((element) => element.userId != widget.initPlayerId).username.toUpperCase()} in TL match ${dateFormat.format(widget.record.timestamp)}"),
|
||||
"${widget.record.endContext.firstWhere((element) => element.userId == widget.initPlayerId).username.toUpperCase()} ${t.vs} ${widget.record.endContext.firstWhere((element) => element.userId != widget.initPlayerId).username.toUpperCase()} in TL match ${dateFormat.format(widget.record.timestamp)}"),
|
||||
),
|
||||
backgroundColor: Colors.black,
|
||||
body: SafeArea(
|
||||
|
@ -135,7 +137,7 @@ class TlMatchResultState extends State<TlMatchResultView> {
|
|||
children: [
|
||||
Padding(
|
||||
padding: const EdgeInsets.only(bottom: 16),
|
||||
child: Text("Nerd Stats",
|
||||
child: Text(t.nerdStats,
|
||||
style: TextStyle(
|
||||
fontFamily: "Eurostile Round Extended",
|
||||
fontSize: bigScreen ? 42 : 28)),
|
||||
|
@ -177,21 +179,21 @@ class TlMatchResultState extends State<TlMatchResultView> {
|
|||
higherIsBetter: true,
|
||||
),
|
||||
CompareThingy(
|
||||
label: "Cheese",
|
||||
label: t.statCellNum.cheese.replaceAll(RegExp(r'\n'), " "),
|
||||
greenSide: widget.record.endContext.firstWhere((element) => element.userId == widget.initPlayerId).nerdStats.cheese,
|
||||
redSide: widget.record.endContext.firstWhere((element) => element.userId != widget.initPlayerId).nerdStats.cheese,
|
||||
fractionDigits: 2,
|
||||
higherIsBetter: true,
|
||||
),
|
||||
CompareThingy(
|
||||
label: "Garbage Eff.",
|
||||
label: "Gb Eff.",
|
||||
greenSide: widget.record.endContext.firstWhere((element) => element.userId == widget.initPlayerId).nerdStats.gbe,
|
||||
redSide: widget.record.endContext.firstWhere((element) => element.userId != widget.initPlayerId).nerdStats.gbe,
|
||||
fractionDigits: 3,
|
||||
higherIsBetter: true,
|
||||
),
|
||||
CompareThingy(
|
||||
label: "Weighted APP",
|
||||
label: "wAPP",
|
||||
greenSide: widget.record.endContext.firstWhere((element) => element.userId == widget.initPlayerId).nerdStats.nyaapp,
|
||||
redSide: widget.record.endContext.firstWhere((element) => element.userId != widget.initPlayerId).nerdStats.nyaapp,
|
||||
fractionDigits: 3,
|
||||
|
@ -205,7 +207,7 @@ class TlMatchResultState extends State<TlMatchResultView> {
|
|||
higherIsBetter: true,
|
||||
),
|
||||
CompareThingy(
|
||||
label: "Est. of TR",
|
||||
label: t.statCellNum.estOfTR,
|
||||
greenSide: widget.record.endContext.firstWhere((element) => element.userId == widget.initPlayerId).estTr.esttr,
|
||||
redSide: widget.record.endContext.firstWhere((element) => element.userId != widget.initPlayerId).estTr.esttr,
|
||||
fractionDigits: 2,
|
||||
|
@ -578,311 +580,3 @@ class CompareThingy extends StatelessWidget {
|
|||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CompareBoolThingy extends StatelessWidget {
|
||||
final bool greenSide;
|
||||
final bool redSide;
|
||||
final String label;
|
||||
final bool trueIsBetter;
|
||||
const CompareBoolThingy(
|
||||
{super.key,
|
||||
required this.greenSide,
|
||||
required this.redSide,
|
||||
required this.label,
|
||||
required this.trueIsBetter});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 2, 16, 2),
|
||||
child: Row(children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: const [Colors.green, Colors.transparent],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
stops: [
|
||||
0.0,
|
||||
trueIsBetter
|
||||
? greenSide
|
||||
? 0.6
|
||||
: 0
|
||||
: !greenSide
|
||||
? 0.6
|
||||
: 0
|
||||
],
|
||||
)),
|
||||
child: Text(
|
||||
greenSide ? "Yes" : "No",
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
offset: Offset(0.0, 0.0),
|
||||
blurRadius: 3.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
Shadow(
|
||||
offset: Offset(0.0, 0.0),
|
||||
blurRadius: 8.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
],
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
)),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(fontSize: 22),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
const Text(
|
||||
"---",
|
||||
style: TextStyle(fontSize: 16),
|
||||
textAlign: TextAlign.center,
|
||||
)
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: const [Colors.red, Colors.transparent],
|
||||
begin: Alignment.centerRight,
|
||||
end: Alignment.centerLeft,
|
||||
stops: [
|
||||
0.0,
|
||||
trueIsBetter
|
||||
? redSide
|
||||
? 0.6
|
||||
: 0
|
||||
: !redSide
|
||||
? 0.6
|
||||
: 0
|
||||
],
|
||||
)),
|
||||
child: Text(
|
||||
redSide ? "Yes" : "No",
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
offset: Offset(0.0, 0.0),
|
||||
blurRadius: 3.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
Shadow(
|
||||
offset: Offset(0.0, 0.0),
|
||||
blurRadius: 8.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
],
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
)),
|
||||
]),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CompareDurationThingy extends StatelessWidget {
|
||||
final Duration greenSide;
|
||||
final Duration redSide;
|
||||
final String label;
|
||||
final bool higherIsBetter;
|
||||
const CompareDurationThingy(
|
||||
{super.key,
|
||||
required this.greenSide,
|
||||
required this.redSide,
|
||||
required this.label,
|
||||
required this.higherIsBetter});
|
||||
|
||||
Duration verdict(Duration greenSide, Duration redSide) {
|
||||
return greenSide - redSide;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 2, 16, 2),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Text(
|
||||
greenSide.toString(),
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
)),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
offset: Offset(0.0, 0.0),
|
||||
blurRadius: 3.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
Shadow(
|
||||
offset: Offset(0.0, 0.0),
|
||||
blurRadius: 8.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
],
|
||||
),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
Text(
|
||||
verdict(greenSide, redSide).toString(),
|
||||
style: const TextStyle(fontSize: 16),
|
||||
textAlign: TextAlign.center,
|
||||
)
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: Text(
|
||||
redSide.toString(),
|
||||
style: const TextStyle(fontSize: 22),
|
||||
textAlign: TextAlign.end,
|
||||
)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class CompareRegTimeThingy extends StatelessWidget {
|
||||
final DateTime? greenSide;
|
||||
final DateTime? redSide;
|
||||
final String label;
|
||||
final int? fractionDigits;
|
||||
const CompareRegTimeThingy(
|
||||
{super.key,
|
||||
required this.greenSide,
|
||||
required this.redSide,
|
||||
required this.label,
|
||||
this.fractionDigits});
|
||||
|
||||
String verdict(DateTime? greenSide, DateTime? redSide) {
|
||||
var f = NumberFormat("#,### days later;#,### days before");
|
||||
String result = "---";
|
||||
if (greenSide != null && redSide != null) {
|
||||
result = f.format(greenSide.difference(redSide).inDays);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
DateFormat f = DateFormat.yMMMd();
|
||||
return Padding(
|
||||
padding: const EdgeInsets.fromLTRB(16, 2, 16, 2),
|
||||
child: Row(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: const [Colors.green, Colors.transparent],
|
||||
begin: Alignment.centerLeft,
|
||||
end: Alignment.centerRight,
|
||||
stops: [
|
||||
0.0,
|
||||
greenSide == null
|
||||
? 0.6
|
||||
: redSide != null && greenSide!.isBefore(redSide!)
|
||||
? 0.6
|
||||
: 0
|
||||
],
|
||||
)),
|
||||
child: Text(
|
||||
greenSide != null ? f.format(greenSide!) : "From beginning",
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
offset: Offset(0.0, 0.0),
|
||||
blurRadius: 3.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
Shadow(
|
||||
offset: Offset(0.0, 0.0),
|
||||
blurRadius: 8.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
],
|
||||
),
|
||||
textAlign: TextAlign.start,
|
||||
),
|
||||
)),
|
||||
Column(
|
||||
children: [
|
||||
Text(
|
||||
label,
|
||||
style: const TextStyle(fontSize: 22),
|
||||
textAlign: TextAlign.center,
|
||||
),
|
||||
Text(
|
||||
verdict(greenSide, redSide),
|
||||
style: const TextStyle(fontSize: 16),
|
||||
textAlign: TextAlign.center,
|
||||
)
|
||||
],
|
||||
),
|
||||
Expanded(
|
||||
child: Container(
|
||||
padding: const EdgeInsets.all(4),
|
||||
decoration: BoxDecoration(
|
||||
gradient: LinearGradient(
|
||||
colors: const [Colors.red, Colors.transparent],
|
||||
begin: Alignment.centerRight,
|
||||
end: Alignment.centerLeft,
|
||||
stops: [
|
||||
0.0,
|
||||
redSide == null
|
||||
? 0.6
|
||||
: greenSide != null && redSide!.isBefore(greenSide!)
|
||||
? 0.6
|
||||
: 0
|
||||
],
|
||||
)),
|
||||
child: Text(
|
||||
redSide != null ? f.format(redSide!) : "From beginning",
|
||||
style: const TextStyle(
|
||||
fontSize: 22,
|
||||
shadows: <Shadow>[
|
||||
Shadow(
|
||||
offset: Offset(0.0, 0.0),
|
||||
blurRadius: 3.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
Shadow(
|
||||
offset: Offset(0.0, 0.0),
|
||||
blurRadius: 8.0,
|
||||
color: Colors.black,
|
||||
),
|
||||
],
|
||||
),
|
||||
textAlign: TextAlign.end,
|
||||
),
|
||||
)),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ class TLThingy extends StatelessWidget {
|
|||
showLabels: false,
|
||||
showTicks: false,
|
||||
radiusFactor: 2.1,
|
||||
centerY: 0.4,
|
||||
centerY: 0.5,
|
||||
minimum: 0,
|
||||
maximum: 1,
|
||||
ranges: [
|
||||
|
@ -192,7 +192,7 @@ class TLThingy extends StatelessWidget {
|
|||
showTicks: false,
|
||||
showLabels: false,
|
||||
radiusFactor: 2.1,
|
||||
centerY: 0.4,
|
||||
centerY: 0.5,
|
||||
minimum: 1.8,
|
||||
maximum: 2.4,
|
||||
ranges: [
|
||||
|
@ -235,7 +235,7 @@ class TLThingy extends StatelessWidget {
|
|||
)
|
||||
],
|
||||
));
|
||||
},), verticalAlignment: GaugeAlignment.far, positionFactor: 0.05,),
|
||||
},), verticalAlignment: GaugeAlignment.far, positionFactor: 0.05),
|
||||
if (oldTl != null) GaugeAnnotation(widget: Text(fDiff.format(tl.nerdStats!.vsapm - oldTl!.nerdStats!.vsapm), style: TextStyle(
|
||||
color: tl.nerdStats!.vsapm - oldTl!.nerdStats!.vsapm < 0 ?
|
||||
Colors.red :
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
"fetchDate": "Fetched ${date}",
|
||||
"exactGametime": "Exact gametime",
|
||||
"bigRedBanned": "BANNED",
|
||||
"normalBanned": "Banned",
|
||||
"bigRedBadStanding": "BAD STANDING",
|
||||
"copiedToClipboard": "Copied to clipboard!",
|
||||
"playerRoleAccount": " account ",
|
||||
|
@ -76,6 +77,23 @@
|
|||
"trackedPlayersEntry": "${nickname}: ${numberOfStates} states",
|
||||
"trackedPlayersDescription": "From ${firstStateDate} until ${lastStateDate}",
|
||||
"trackedPlayersStatesDeleted": "${nickname} states was removed from database!",
|
||||
"averageXrank": "Average ${rankLetter} rank",
|
||||
"vs": "vs",
|
||||
"registred": "Registred",
|
||||
"playedTL": "Played Tetra League",
|
||||
"winChance": "Win Chance",
|
||||
"byGlicko": "By Glicko",
|
||||
"byEstTR": "By Est. TR",
|
||||
"compareViewNoValues": "Please, enter username, user ID, or APM-PPS-VS values (divider doesn't matter, only order matter) to both of fields",
|
||||
"compareViewWrongValue": "Falied to assign ${value}",
|
||||
"mostRecentOne": "Most recent one",
|
||||
"yes": "Yes",
|
||||
"no": "No",
|
||||
"daysLater": "days later",
|
||||
"dayseBefore": "days before",
|
||||
"fromBeginning": "From beginning",
|
||||
"calc": "Calc",
|
||||
"calcViewNoValues": "Enter values to calculate the stats",
|
||||
"statCellNum":{
|
||||
"xpLevel": "XP Level",
|
||||
"xpProgress": "Progress to next level",
|
||||
|
@ -87,7 +105,9 @@
|
|||
"apm": "Attack\nPer Minute",
|
||||
"vs": "Versus\nScore",
|
||||
"lbp": "Leaderboard\nplacement",
|
||||
"lbpShort": "№ in LB",
|
||||
"lbpc": "Country LB\nplacement",
|
||||
"lbpcShort": "№ in local LB",
|
||||
"gamesPlayed": "Games\nplayed",
|
||||
"gamesWonTL": "Games\nWon",
|
||||
"winrate": "Winrate\nprecentage",
|
||||
|
@ -105,17 +125,17 @@
|
|||
"appDescription": "(Abbreviated as APP) Main efficiency metric. Tells how many attack you producing per piece",
|
||||
"vsapmDescription": "Basically, tells how much and how efficient you using garbage in your attacks",
|
||||
"dss": "Downstack\nPer Second",
|
||||
"dssDescription": "Downstack per Second measures how many garbage lines you clear in a second.",
|
||||
"dssDescription": "(Abbreviated as DS/S) Downstack per Second measures how many garbage lines you clear in a second.",
|
||||
"dsp": "Downstack\nPer Piece",
|
||||
"dspDescription": "Downstack per Piece measures how many garbage lines you clear per piece.",
|
||||
"dspDescription": "(Abbreviated as DS/P) Downstack per Piece measures how many garbage lines you clear per piece.",
|
||||
"appdsp": "APP + DS/P",
|
||||
"appdspDescription": "Just a sum of Attack per Piece and Downstack per Piece.",
|
||||
"cheese": "Cheese\nIndex",
|
||||
"cheeseDescription": "Cheese Index is an approximation how much clean / cheese garbage player sends. Lower = more clean. Higher = more cheese.\nInvented by kerrmunism",
|
||||
"cheeseDescription": "(Abbreviated as Cheese) Cheese Index is an approximation how much clean / cheese garbage player sends. Lower = more clean. Higher = more cheese.\nInvented by kerrmunism",
|
||||
"gbe": "Garbage\nEfficiency",
|
||||
"gbeDescription": "Garbage Efficiency measures how well player uses their garbage. Higher = better or they use their garbage more. Lower = they mostly send their garbage back at cheese or rarely clear garbage.\nInvented by Zepheniah and Dragonboy.",
|
||||
"gbeDescription": "(Abbreviated as Gb Eff.) Garbage Efficiency measures how well player uses their garbage. Higher = better or they use their garbage more. Lower = they mostly send their garbage back at cheese or rarely clear garbage.\nInvented by Zepheniah and Dragonboy.",
|
||||
"nyaapp": "Weighted\nAPP",
|
||||
"nyaappDescription": "Essentially, a measure of your ability to send cheese while still maintaining a high APP.\nInvented by Wertj.",
|
||||
"nyaappDescription": "(Abbreviated as wAPP) Essentially, a measure of your ability to send cheese while still maintaining a high APP.\nInvented by Wertj.",
|
||||
"area": "Area",
|
||||
"areaDescription": "How much space your shape takes up on the graph, if you exclude the cheese and vs/apm sections",
|
||||
"estOfTR": "Est. of TR",
|
||||
|
|
|
@ -29,6 +29,7 @@
|
|||
"fetchDate": "На момент ${date}",
|
||||
"exactGametime": "Время, проведённое в игре",
|
||||
"bigRedBanned": "ЗАБАНЕН",
|
||||
"normalBanned": "Забанен",
|
||||
"bigRedBadStanding": "ПЛОХАЯ РЕПУТАЦИЯ",
|
||||
"copiedToClipboard": "Скопировано в буфер обмена!",
|
||||
"playerRoleAccount": ", аккаунт которого ",
|
||||
|
@ -76,6 +77,23 @@
|
|||
"trackedPlayersEntry": "${nickname}: ${numberOfStates} состояний",
|
||||
"trackedPlayersDescription": "Начиная с ${firstStateDate} и заканчивая ${lastStateDate}",
|
||||
"trackedPlayersStatesDeleted": "Состояния аккаунта ${nickname} были удалены из локальной базы данных!",
|
||||
"averageXrank": "Средний ${rankLetter} ранг",
|
||||
"vs": "против",
|
||||
"registred": "Зарегистрирован",
|
||||
"playedTL": "Играл в Тетра Лигу",
|
||||
"winChance": "Шансы на победу",
|
||||
"byGlicko": "По Glicko",
|
||||
"byEstTR": "По расч. TR",
|
||||
"compareViewNoValues": "Пожалуйста, введите никнейм, ID или значения APM-PPS-VS (неважно, какой разделитель, важен порядок) в оба поля",
|
||||
"compareViewWrongValue": "Не удалось получить ${value}",
|
||||
"mostRecentOne": "Самый последний",
|
||||
"yes": "Да",
|
||||
"no": "Нет",
|
||||
"daysLater": "дней позже",
|
||||
"dayseBefore": "дней до",
|
||||
"fromBeginning": "С начала",
|
||||
"calc": "Считать",
|
||||
"calcViewNoValues": "Введите значения, чтобы посчитать статистику",
|
||||
"statCellNum": {
|
||||
"xpLevel": "Уровень\nопыта",
|
||||
"xpProgress": "Прогресс до следующего уровня",
|
||||
|
@ -87,7 +105,9 @@
|
|||
"apm": "Атака в\nМинуту",
|
||||
"vs": "Показатель\nVersus",
|
||||
"lbp": "Положение\nв рейтинге",
|
||||
"lbpShort": "№ в рейтинге",
|
||||
"lbpc": "Положение\nв рейтинге страны",
|
||||
"lbpcShort": "№ по стране",
|
||||
"gamesPlayed": "Игр\nСыграно",
|
||||
"gamesWonTL": "Побед",
|
||||
"winrate": "Процент\nпобед",
|
||||
|
|
Loading…
Reference in New Issue