My brain hurts

I guess i should get drunk
This commit is contained in:
dan63047 2024-10-11 01:35:48 +03:00
parent 672c2a6c8c
commit 3c83a6c244
2 changed files with 749 additions and 526 deletions

View File

@ -14,7 +14,7 @@ class TetrioPlayer {
late String role; late String role;
int? avatarRevision; int? avatarRevision;
int? bannerRevision; int? bannerRevision;
DateTime? registrationTime; late DateTime registrationTime;
List<Badge> badges = []; List<Badge> badges = [];
String? bio; String? bio;
String? country; String? country;
@ -39,7 +39,7 @@ class TetrioPlayer {
required this.state, required this.state,
this.avatarRevision, this.avatarRevision,
this.bannerRevision, this.bannerRevision,
this.registrationTime, required this.registrationTime,
required this.badges, required this.badges,
this.bio, this.bio,
this.country, this.country,

View File

@ -48,6 +48,126 @@ class CompareState extends State<CompareView> {
List<TetrioPlayer> players = []; List<TetrioPlayer> players = [];
List<Summaries> summaries = []; List<Summaries> summaries = [];
List<String> nicknames = []; List<String> nicknames = [];
Map<String, List<String>> TitesForStats = {
"General": [
"Registration Date",
"XP",
"Time Played",
"Online Games Played",
"Online Games Won",
"Followers",
],
"Tetra League": [
"Tetra Rating",
"Glicko",
"RD",
"GLIXARE",
"S1-like TR",
"Position",
"Games Played",
"Games Won",
"Winrate",
"Attack Per Minute",
"Pieces Per Second",
"Versus Score",
"Nerd Stats",
"Attack Per Piece",
"VS / APM",
"Downstack Per Second",
"Downstack Per Piece",
"APP + DSP",
"Cheese Index",
"Garbage Efficiency",
"Weighted APP",
"Area",
"Playstyle",
"Opener",
"Plonk",
"Stride",
"Infinite Downstack"
],
"Quick Play":[
"Altitude",
"Position",
"Attack Per Minute",
"Pieces Per Second",
"Versus Score",
"KO's",
"Top B2B",
"Climb Speed",
"Peak Climb Speed",
"Time Spend",
"Finesse",
"Nerd Stats",
"Attack Per Piece",
"VS / APM",
"Downstack Per Second",
"Downstack Per Piece",
"APP + DSP",
"Cheese Index",
"Garbage Efficiency",
"Weighted APP",
"Area",
"Playstyle",
"Opener",
"Plonk",
"Stride",
"Infinite Downstack",
],
"Quick Play Expert": [
"Altitude",
"Position",
"Attack Per Minute",
"Pieces Per Second",
"Versus Score",
"KO's",
"Top B2B",
"Climb Speed",
"Peak Climb Speed",
"Time Spend",
"Finesse",
"Nerd Stats",
"Attack Per Piece",
"VS / APM",
"Downstack Per Second",
"Downstack Per Piece",
"APP + DSP",
"Cheese Index",
"Garbage Efficiency",
"Weighted APP",
"Area",
"Playstyle",
"Opener",
"Plonk",
"Stride",
"Infinite Downstack",
],
"40 Lines": [
"Time",
"Pieces",
"Inputs",
"Key Presses Per Piece",
"Pieces Per Second",
"Key Presses Per Second",
""
],
"Blitz": [
"Score",
"Pieces",
"Inputs",
"Key Presses Per Piece",
"Pieces Per Second",
"Key Presses Per Second",
""
],
"Zen": [
"Score",
"Level"
]
};
List<List<List<dynamic>>> rawValues = [[],[],[],[],[],[],[]];
List<List<List<Widget>>> formattedValues = [[],[],[],[],[],[],[]]; //formattedValues[category][player][stat]
List<List<dynamic>> best = [];
TextStyle _expansionTileTitleTextStyle = TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 24.0); TextStyle _expansionTileTitleTextStyle = TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 24.0);
@override @override
@ -67,9 +187,362 @@ class CompareState extends State<CompareView> {
super.dispose(); super.dispose();
} }
addvaluesEntrys(TetrioPlayer p, Summaries s){
rawValues[0].add([
p.registrationTime,
p.xp,
p.gameTime,
p.gamesPlayed,
p.gamesWon,
p.friendCount
]);
rawValues[1].add(
[
s.league.tr,
s.league.glicko,
s.league.rd,
s.league.gxe,
s.league.s1tr,
s.league.standing,
s.league.gamesPlayed,
s.league.gamesWon,
s.league.winrate,
s.league.apm,
s.league.pps,
s.league.vs,
"",
s.league.nerdStats?.app,
s.league.nerdStats?.vsapm,
s.league.nerdStats?.dss,
s.league.nerdStats?.dsp,
s.league.nerdStats?.appdsp,
s.league.nerdStats?.cheese,
s.league.nerdStats?.gbe,
s.league.nerdStats?.nyaapp,
s.league.nerdStats?.area,
"",
s.league.playstyle?.opener,
s.league.playstyle?.plonk,
s.league.playstyle?.stride,
s.league.playstyle?.infds,
]
);
rawValues[2].add([
s.zenith?.stats.zenith?.altitude,
s.zenith?.rank,
s.zenith?.aggregateStats.apm,
s.zenith?.aggregateStats.pps,
s.zenith?.aggregateStats.vs,
s.zenith?.stats.kills,
s.zenith?.stats.topBtB,
s.zenith?.stats.cps,
s.zenith?.stats.zenith?.peakrank,
s.zenith?.stats.finalTime,
s.zenith?.stats.finessePercentage,
"",
s.zenith?.aggregateStats.nerdStats.app,
s.zenith?.aggregateStats.nerdStats.vsapm,
s.zenith?.aggregateStats.nerdStats.dss,
s.zenith?.aggregateStats.nerdStats.dsp,
s.zenith?.aggregateStats.nerdStats.appdsp,
s.zenith?.aggregateStats.nerdStats.cheese,
s.zenith?.aggregateStats.nerdStats.gbe,
s.zenith?.aggregateStats.nerdStats.nyaapp,
s.zenith?.aggregateStats.nerdStats.area,
"",
s.zenith?.aggregateStats.playstyle.opener,
s.zenith?.aggregateStats.playstyle.plonk,
s.zenith?.aggregateStats.playstyle.stride,
s.zenith?.aggregateStats.playstyle.infds,
]);
rawValues[3].add([
s.zenithEx?.stats.zenith?.altitude,
s.zenithEx?.rank,
s.zenithEx?.aggregateStats.apm,
s.zenithEx?.aggregateStats.pps,
s.zenithEx?.aggregateStats.vs,
s.zenithEx?.stats.kills,
s.zenithEx?.stats.topBtB,
s.zenithEx?.stats.cps,
s.zenithEx?.stats.zenith?.peakrank,
s.zenithEx?.stats.finalTime,
s.zenithEx?.stats.finessePercentage,
"",
s.zenithEx?.aggregateStats.nerdStats.app,
s.zenithEx?.aggregateStats.nerdStats.vsapm,
s.zenithEx?.aggregateStats.nerdStats.dss,
s.zenithEx?.aggregateStats.nerdStats.dsp,
s.zenithEx?.aggregateStats.nerdStats.appdsp,
s.zenithEx?.aggregateStats.nerdStats.cheese,
s.zenithEx?.aggregateStats.nerdStats.gbe,
s.zenithEx?.aggregateStats.nerdStats.nyaapp,
s.zenithEx?.aggregateStats.nerdStats.area,
"",
s.zenithEx?.aggregateStats.playstyle.opener,
s.zenithEx?.aggregateStats.playstyle.plonk,
s.zenithEx?.aggregateStats.playstyle.stride,
s.zenithEx?.aggregateStats.playstyle.infds,
]);;
rawValues[4].add([
s.sprint?.stats.finalTime,
s.sprint?.stats.piecesPlaced,
s.sprint?.stats.inputs,
s.sprint?.stats.kpp,
s.sprint?.stats.pps,
s.sprint?.stats.kps
]);
rawValues[5].add(
[
s.blitz?.stats.score,
s.blitz?.stats.piecesPlaced,
s.blitz?.stats.inputs,
s.blitz?.stats.kpp,
s.blitz?.stats.pps,
s.blitz?.stats.kps
]
);
rawValues[6].add([
s.zen.score,
s.zen.level
]);
formattedValues[0].add([
Text(timestamp(p.registrationTime!)),
RichText(text: p.xp.isNegative ? TextSpan(text: "hidden", style: TextStyle(fontFamily: "Eurostile Round", color: Colors.grey)) : TextSpan(text: intf.format(p.xp), style: TextStyle(fontFamily: "Eurostile Round"), children: [TextSpan(text: " (lvl ${intf.format(p.level.floor())})", style: TextStyle(color: Colors.grey))])),
Text(p.gameTime.isNegative ? "hidden" : playtime(p.gameTime), style: TextStyle(color: p.gameTime.isNegative ? Colors.grey : Colors.white)),
Text(p.gamesPlayed.isNegative ? "hidden" : intf.format(p.gamesPlayed), style: TextStyle(color: p.gamesPlayed.isNegative ? Colors.grey : Colors.white)),
Text(p.gamesWon.isNegative ? "hidden" : intf.format(p.gamesWon), style: TextStyle(color: p.gamesWon.isNegative ? Colors.grey : Colors.white)),
Text(intf.format(p.friendCount))
]);
formattedValues[1].add([
Text(s.league.tr.isNegative ? "---" : f4.format(s.league.tr)),
Text(s.league.glicko!.isNegative ? "---" : f4.format(s.league.glicko)),
Text(s.league.rd!.isNegative ? "---" : f4.format(s.league.rd), style: TextStyle(color: s.league.rd!.isNegative ? Colors.grey : Colors.white)),
Text(s.league.gxe.isNegative ? "---" : f4.format(s.league.gxe)),
Text(s.league.s1tr.isNegative ? "---" : f4.format(s.league.s1tr)),
Text(s.league.standing.isNegative ? "---" : ""+intf.format(s.league.standing)),
Text(intf.format(s.league.gamesPlayed)),
Text(intf.format(s.league.gamesWon)),
Text(s.league.winrate.isNaN ? "---" : f4.format(s.league.winrate*100)+"%"),
Text(s.league.apm != null ? f2.format(s.league.apm) : "---"),
Text(s.league.pps != null ? f2.format(s.league.pps) : "---"),
Text(s.league.vs != null ? f2.format(s.league.vs) : "---"),
Text(""),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.app) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.vsapm) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.dss) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.dsp) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.appdsp) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.cheese) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.gbe) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.nyaapp) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.area) : "---"),
Text(""),
Text(s.league.playstyle != null ? f4.format(s.league.playstyle!.opener) : "---"),
Text(s.league.playstyle != null ? f4.format(s.league.playstyle!.plonk) : "---"),
Text(s.league.playstyle != null ? f4.format(s.league.playstyle!.stride) : "---"),
Text(s.league.playstyle != null ? f4.format(s.league.playstyle!.infds) : "---"),
]);
formattedValues[2].add([
Text(s.zenith != null ? f4.format(s.zenith!.stats.zenith!.altitude) : "---"),
Text(s.zenith != null ? ""+intf.format(s.zenith!.rank) : "---"),
Text(s.zenith != null ? f2.format(s.zenith!.aggregateStats.apm) : "---"),
Text(s.zenith != null ? f2.format(s.zenith!.aggregateStats.pps) : "---"),
Text(s.zenith != null ? f2.format(s.zenith!.aggregateStats.vs) : "---"),
Text(s.zenith != null ? intf.format(s.zenith!.stats.kills) : "---"),
Text(s.zenith != null ? intf.format(s.zenith!.stats.topBtB) : "---"),
Text(s.zenith != null ? f4.format(s.zenith!.stats.cps) : "---"),
Text(s.zenith != null ? f4.format(s.zenith!.stats.zenith!.peakrank) : "---"),
Text(s.zenith != null ? getMoreNormalTime(s.zenith!.stats.finalTime) : "---"),
Text(s.zenith != null ? f2.format(s.zenith!.stats.finessePercentage*100)+"%" : "---"),
Text(""),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.app) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.vsapm) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.dss) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.dsp) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.appdsp) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.cheese) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.gbe) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.nyaapp) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.area) : "---"),
Text(""),
Text(s.zenith?.aggregateStats.playstyle != null ? f4.format(s.zenith!.aggregateStats.playstyle.opener) : "---"),
Text(s.zenith?.aggregateStats.playstyle != null ? f4.format(s.zenith!.aggregateStats.playstyle.plonk) : "---"),
Text(s.zenith?.aggregateStats.playstyle != null ? f4.format(s.zenith!.aggregateStats.playstyle.stride) : "---"),
Text(s.zenith?.aggregateStats.playstyle != null ? f4.format(s.zenith!.aggregateStats.playstyle.infds) : "---"),
]);
formattedValues[3].add([
Text(s.zenith != null ? f4.format(s.zenith!.stats.zenith!.altitude) : "---"),
Text(s.zenith != null ? ""+intf.format(s.zenith!.rank) : "---"),
Text(s.zenith != null ? f2.format(s.zenith!.aggregateStats.apm) : "---"),
Text(s.zenith != null ? f2.format(s.zenith!.aggregateStats.pps) : "---"),
Text(s.zenith != null ? f2.format(s.zenith!.aggregateStats.vs) : "---"),
Text(s.zenith != null ? intf.format(s.zenith!.stats.kills) : "---"),
Text(s.zenith != null ? intf.format(s.zenith!.stats.topBtB) : "---"),
Text(s.zenith != null ? f4.format(s.zenith!.stats.cps) : "---"),
Text(s.zenith != null ? f4.format(s.zenith!.stats.zenith!.peakrank) : "---"),
Text(s.zenith != null ? getMoreNormalTime(s.zenith!.stats.finalTime) : "---"),
Text(s.zenith != null ? f2.format(s.zenith!.stats.finessePercentage*100)+"%" : "---"),
Text(""),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.app) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.vsapm) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.dss) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.dsp) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.appdsp) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.cheese) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.gbe) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.nyaapp) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.area) : "---"),
Text(""),
Text(s.zenith?.aggregateStats.playstyle != null ? f4.format(s.zenith!.aggregateStats.playstyle.opener) : "---"),
Text(s.zenith?.aggregateStats.playstyle != null ? f4.format(s.zenith!.aggregateStats.playstyle.plonk) : "---"),
Text(s.zenith?.aggregateStats.playstyle != null ? f4.format(s.zenith!.aggregateStats.playstyle.stride) : "---"),
Text(s.zenith?.aggregateStats.playstyle != null ? f4.format(s.zenith!.aggregateStats.playstyle.infds) : "---"),
]);
formattedValues[4].add([
Text(s.sprint != null ? getMoreNormalTime(s.sprint!.stats.finalTime) : "---"),
Text(s.sprint != null ? intf.format(s.sprint!.stats.piecesPlaced) : "---"),
Text(s.sprint != null ? intf.format(s.sprint!.stats.inputs) : "---"),
Text(s.sprint != null ? f4.format(s.sprint!.stats.kpp) : "---"),
Text(s.sprint != null ? f4.format(s.sprint!.stats.pps) : "---"),
Text(s.sprint != null ? f4.format(s.sprint!.stats.kps) : "---")
]);
formattedValues[5].add([
Text(s.blitz != null ? getMoreNormalTime(s.blitz!.stats.finalTime) : "---"),
Text(s.blitz != null ? intf.format(s.blitz!.stats.piecesPlaced) : "---"),
Text(s.blitz != null ? intf.format(s.blitz!.stats.inputs) : "---"),
Text(s.blitz != null ? f4.format(s.blitz!.stats.kpp) : "---"),
Text(s.blitz != null ? f4.format(s.blitz!.stats.pps) : "---"),
Text(s.blitz != null ? f4.format(s.blitz!.stats.kps) : "---")
]);
formattedValues[6].add([
Text(intf.format(s.zen.score)),
Text(intf.format(s.zen.level))
]);
}
List<List<dynamic>> recalculateBestEntries(){
return [
[
players.reduce((curr, next) => curr.registrationTime.isBefore(next.registrationTime) ? curr : next).registrationTime,
players.reduce((curr, next) => curr.xp > next.xp ? curr : next).xp,
players.reduce((curr, next) => curr.gameTime.compareTo(next.gameTime) > 0 ? curr : next).gameTime,
players.reduce((curr, next) => curr.gamesPlayed > next.gamesPlayed ? curr : next).gamesPlayed,
players.reduce((curr, next) => curr.gamesWon > next.gamesWon ? curr : next).gamesWon,
players.reduce((curr, next) => curr.friendCount > next.friendCount ? curr : next).friendCount,
],
[
summaries.reduce((curr, next) => curr.league.tr > next.league.tr ? curr : next).league.tr,
summaries.reduce((curr, next) => (curr.league.glicko??-1) > (next.league.glicko??-1) ? curr : next).league.glicko,
summaries.reduce((curr, next) => (curr.league.rd??-1) > (next.league.rd??-1) ? curr : next).league.rd,
summaries.reduce((curr, next) => curr.league.gxe > next.league.gxe ? curr : next).league.gxe,
summaries.reduce((curr, next) => curr.league.s1tr > next.league.s1tr ? curr : next).league.s1tr,
summaries.reduce((curr, next) => curr.league.standing > next.league.standing ? curr : next).league.standing,
summaries.reduce((curr, next) => curr.league.gamesPlayed > next.league.gamesPlayed ? curr : next).league.gamesPlayed,
summaries.reduce((curr, next) => curr.league.gamesWon > next.league.gamesWon ? curr : next).league.gamesWon,
summaries.reduce((curr, next) => curr.league.winrate > next.league.winrate ? curr : next).league.winrate,
summaries.reduce((curr, next) => (curr.league.apm??0) > (next.league.apm??0) ? curr : next).league.apm,
summaries.reduce((curr, next) => (curr.league.pps??0) > (next.league.pps??0) ? curr : next).league.pps,
summaries.reduce((curr, next) => (curr.league.vs??0) > (next.league.vs??0) ? curr : next).league.vs,
null,
summaries.reduce((curr, next) => (curr.league.nerdStats?.app??0) > (next.league.nerdStats?.app??0) ? curr : next).league.nerdStats?.app,
summaries.reduce((curr, next) => (curr.league.nerdStats?.vsapm??0) > (next.league.nerdStats?.vsapm??0) ? curr : next).league.nerdStats?.vsapm,
summaries.reduce((curr, next) => (curr.league.nerdStats?.dss??0) > (next.league.nerdStats?.dss??0) ? curr : next).league.nerdStats?.dss,
summaries.reduce((curr, next) => (curr.league.nerdStats?.dsp??0) > (next.league.nerdStats?.dsp??0) ? curr : next).league.nerdStats?.dsp,
summaries.reduce((curr, next) => (curr.league.nerdStats?.appdsp??0) > (next.league.nerdStats?.appdsp??0) ? curr : next).league.nerdStats?.appdsp,
summaries.reduce((curr, next) => (curr.league.nerdStats?.cheese??double.negativeInfinity) > (next.league.nerdStats?.cheese??double.negativeInfinity) ? curr : next).league.nerdStats?.cheese,
summaries.reduce((curr, next) => (curr.league.nerdStats?.gbe??0) > (next.league.nerdStats?.gbe??0) ? curr : next).league.nerdStats?.gbe,
summaries.reduce((curr, next) => (curr.league.nerdStats?.nyaapp??0) > (next.league.nerdStats?.nyaapp??0) ? curr : next).league.nerdStats?.nyaapp,
summaries.reduce((curr, next) => (curr.league.nerdStats?.area??0) > (next.league.nerdStats?.area??0) ? curr : next).league.nerdStats?.area,
null,
summaries.reduce((curr, next) => (curr.league.playstyle?.opener??double.negativeInfinity) > (next.league.playstyle?.opener??double.negativeInfinity) ? curr : next).league.playstyle?.opener,
summaries.reduce((curr, next) => (curr.league.playstyle?.plonk??double.negativeInfinity) > (next.league.playstyle?.plonk??double.negativeInfinity) ? curr : next).league.playstyle?.plonk,
summaries.reduce((curr, next) => (curr.league.playstyle?.stride??double.negativeInfinity) > (next.league.playstyle?.stride??double.negativeInfinity) ? curr : next).league.playstyle?.stride,
summaries.reduce((curr, next) => (curr.league.playstyle?.infds??double.negativeInfinity) > (next.league.playstyle?.infds??double.negativeInfinity) ? curr : next).league.playstyle?.infds
],
[
summaries.reduce((curr, next) => (curr.zenith?.stats.zenith?.altitude??-1) > (next.zenith?.stats.zenith?.altitude??-1) ? curr : next).zenith?.stats.zenith?.altitude??-1,
summaries.reduce((curr, next) => (curr.zenith?.rank??-1) > (next.zenith?.rank??-1) ? curr : next).zenith?.rank,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.apm??-1) > (next.zenith?.aggregateStats.apm??-1) ? curr : next).zenith?.aggregateStats.apm,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.pps??-1) > (next.zenith?.aggregateStats.pps??-1) ? curr : next).zenith?.aggregateStats.pps,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.vs??-1) > (next.zenith?.aggregateStats.vs??-1) ? curr : next).zenith?.aggregateStats.vs,
summaries.reduce((curr, next) => (curr.zenith?.stats.kills??-1) > (next.zenith?.stats.kills??-1) ? curr : next).zenith?.stats.kills,
summaries.reduce((curr, next) => (curr.zenith?.stats.topBtB??-1) > (next.zenith?.stats.topBtB??-1) ? curr : next).zenith?.stats.topBtB,
summaries.reduce((curr, next) => (curr.zenith?.stats.cps??-1) > (next.zenith?.stats.cps??-1) ? curr : next).zenith?.stats.cps,
summaries.reduce((curr, next) => (curr.zenith?.stats.zenith?.peakrank??-1) > (next.zenith?.stats.zenith?.peakrank??-1) ? curr : next).zenith?.stats.zenith?.peakrank,
summaries.reduce((curr, next) => (curr.zenith?.stats.finalTime != null) ? curr.zenith!.stats.finalTime.compareTo(next.zenith?.stats.finalTime??Duration.zero) > 1 ? curr : next : next).zenith?.stats.finalTime,
summaries.reduce((curr, next) => (curr.zenith?.stats.finessePercentage??-1) > (next.zenith?.stats.finessePercentage??-1) ? curr : next).zenith?.stats.finessePercentage,
null,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.nerdStats.app??0) > (next.zenith?.aggregateStats.nerdStats.app??0) ? curr : next).zenith?.aggregateStats.nerdStats.app,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.nerdStats.vsapm??0) > (next.zenith?.aggregateStats.nerdStats.vsapm??0) ? curr : next).zenith?.aggregateStats.nerdStats.vsapm,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.nerdStats.dss??0) > (next.zenith?.aggregateStats.nerdStats.dss??0) ? curr : next).zenith?.aggregateStats.nerdStats.dss,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.nerdStats.dsp??0) > (next.zenith?.aggregateStats.nerdStats.dsp??0) ? curr : next).zenith?.aggregateStats.nerdStats.dsp,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.nerdStats.appdsp??0) > (next.zenith?.aggregateStats.nerdStats.appdsp??0) ? curr : next).zenith?.aggregateStats.nerdStats.appdsp,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.nerdStats.cheese??double.negativeInfinity) > (next.zenith?.aggregateStats.nerdStats.cheese??double.negativeInfinity) ? curr : next).zenith?.aggregateStats.nerdStats.cheese,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.nerdStats.gbe??0) > (next.zenith?.aggregateStats.nerdStats.gbe??0) ? curr : next).zenith?.aggregateStats.nerdStats.gbe,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.nerdStats.nyaapp??0) > (next.zenith?.aggregateStats.nerdStats.nyaapp??0) ? curr : next).zenith?.aggregateStats.nerdStats.nyaapp,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.nerdStats.area??0) > (next.zenith?.aggregateStats.nerdStats.area??0) ? curr : next).zenith?.aggregateStats.nerdStats.area,
null,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.playstyle.opener??double.negativeInfinity) > (next.zenith?.aggregateStats.playstyle.opener??double.negativeInfinity) ? curr : next).zenith?.aggregateStats.playstyle.opener,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.playstyle.plonk??double.negativeInfinity) > (next.zenith?.aggregateStats.playstyle.plonk??double.negativeInfinity) ? curr : next).zenith?.aggregateStats.playstyle.plonk,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.playstyle.stride??double.negativeInfinity) > (next.zenith?.aggregateStats.playstyle.stride??double.negativeInfinity) ? curr : next).zenith?.aggregateStats.playstyle.stride,
summaries.reduce((curr, next) => (curr.zenith?.aggregateStats.playstyle.infds??double.negativeInfinity) > (next.zenith?.aggregateStats.playstyle.infds??double.negativeInfinity) ? curr : next).zenith?.aggregateStats.playstyle.infds
],
[
summaries.reduce((curr, next) => (curr.zenithEx?.stats.zenith?.altitude??-1) > (next.zenithEx?.stats.zenith?.altitude??-1) ? curr : next).zenithEx?.stats.zenith?.altitude??-1,
summaries.reduce((curr, next) => (curr.zenithEx?.rank??-1) > (next.zenithEx?.rank??-1) ? curr : next).zenithEx?.rank,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.apm??-1) > (next.zenithEx?.aggregateStats.apm??-1) ? curr : next).zenithEx?.aggregateStats.apm,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.pps??-1) > (next.zenithEx?.aggregateStats.pps??-1) ? curr : next).zenithEx?.aggregateStats.pps,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.vs??-1) > (next.zenithEx?.aggregateStats.vs??-1) ? curr : next).zenithEx?.aggregateStats.vs,
summaries.reduce((curr, next) => (curr.zenithEx?.stats.kills??-1) > (next.zenithEx?.stats.kills??-1) ? curr : next).zenithEx?.stats.kills,
summaries.reduce((curr, next) => (curr.zenithEx?.stats.topBtB??-1) > (next.zenithEx?.stats.topBtB??-1) ? curr : next).zenithEx?.stats.topBtB,
summaries.reduce((curr, next) => (curr.zenithEx?.stats.cps??-1) > (next.zenithEx?.stats.cps??-1) ? curr : next).zenithEx?.stats.cps,
summaries.reduce((curr, next) => (curr.zenithEx?.stats.zenith?.peakrank??-1) > (next.zenithEx?.stats.zenith?.peakrank??-1) ? curr : next).zenithEx?.stats.zenith?.peakrank,
summaries.reduce((curr, next) => (curr.zenithEx?.stats.finalTime != null) ? curr.zenithEx!.stats.finalTime.compareTo(next.zenithEx?.stats.finalTime??Duration.zero) > 1 ? curr : next : next).zenithEx?.stats.finalTime,
summaries.reduce((curr, next) => (curr.zenithEx?.stats.finessePercentage??-1) > (next.zenithEx?.stats.finessePercentage??-1) ? curr : next).zenithEx?.stats.finessePercentage,
null,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.nerdStats.app??0) > (next.zenithEx?.aggregateStats.nerdStats.app??0) ? curr : next).zenithEx?.aggregateStats.nerdStats.app,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.nerdStats.vsapm??0) > (next.zenithEx?.aggregateStats.nerdStats.vsapm??0) ? curr : next).zenithEx?.aggregateStats.nerdStats.vsapm,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.nerdStats.dss??0) > (next.zenithEx?.aggregateStats.nerdStats.dss??0) ? curr : next).zenithEx?.aggregateStats.nerdStats.dss,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.nerdStats.dsp??0) > (next.zenithEx?.aggregateStats.nerdStats.dsp??0) ? curr : next).zenithEx?.aggregateStats.nerdStats.dsp,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.nerdStats.appdsp??0) > (next.zenithEx?.aggregateStats.nerdStats.appdsp??0) ? curr : next).zenithEx?.aggregateStats.nerdStats.appdsp,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.nerdStats.cheese??double.negativeInfinity) > (next.zenithEx?.aggregateStats.nerdStats.cheese??double.negativeInfinity) ? curr : next).zenithEx?.aggregateStats.nerdStats.cheese,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.nerdStats.gbe??0) > (next.zenithEx?.aggregateStats.nerdStats.gbe??0) ? curr : next).zenithEx?.aggregateStats.nerdStats.gbe,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.nerdStats.nyaapp??0) > (next.zenithEx?.aggregateStats.nerdStats.nyaapp??0) ? curr : next).zenithEx?.aggregateStats.nerdStats.nyaapp,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.nerdStats.area??0) > (next.zenithEx?.aggregateStats.nerdStats.area??0) ? curr : next).zenithEx?.aggregateStats.nerdStats.area,
null,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.playstyle.opener??double.negativeInfinity) > (next.zenithEx?.aggregateStats.playstyle.opener??double.negativeInfinity) ? curr : next).zenithEx?.aggregateStats.playstyle.opener,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.playstyle.plonk??double.negativeInfinity) > (next.zenithEx?.aggregateStats.playstyle.plonk??double.negativeInfinity) ? curr : next).zenithEx?.aggregateStats.playstyle.plonk,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.playstyle.stride??double.negativeInfinity) > (next.zenithEx?.aggregateStats.playstyle.stride??double.negativeInfinity) ? curr : next).zenithEx?.aggregateStats.playstyle.stride,
summaries.reduce((curr, next) => (curr.zenithEx?.aggregateStats.playstyle.infds??double.negativeInfinity) > (next.zenithEx?.aggregateStats.playstyle.infds??double.negativeInfinity) ? curr : next).zenithEx?.aggregateStats.playstyle.infds
],
[
summaries.reduce((curr, next) => (curr.sprint?.stats.finalTime != null) ? curr.sprint!.stats.finalTime.compareTo(next.sprint?.stats.finalTime??Duration.zero) < 1 ? curr : next : next).sprint?.stats.finalTime,
summaries.reduce((curr, next) => (curr.sprint?.stats.piecesPlaced??-1) < (next.sprint?.stats.piecesPlaced??-1) ? curr : next).sprint?.stats.piecesPlaced,
summaries.reduce((curr, next) => (curr.sprint?.stats.inputs??-1) < (next.sprint?.stats.inputs??-1) ? curr : next).sprint?.stats.inputs,
summaries.reduce((curr, next) => (curr.sprint?.stats.kpp??-1) < (next.sprint?.stats.kpp??-1) ? curr : next).sprint?.stats.kpp,
summaries.reduce((curr, next) => (curr.sprint?.stats.pps??-1) > (next.sprint?.stats.pps??-1) ? curr : next).sprint?.stats.pps,
summaries.reduce((curr, next) => (curr.sprint?.stats.kps??-1) > (next.sprint?.stats.kps??-1) ? curr : next).sprint?.stats.kps,
],
[
summaries.reduce((curr, next) => (curr.blitz?.stats.score??-1) > (next.blitz?.stats.score??-1) ? curr : next).blitz?.stats.score,
summaries.reduce((curr, next) => (curr.blitz?.stats.piecesPlaced??-1) < (next.blitz?.stats.piecesPlaced??-1) ? curr : next).blitz?.stats.piecesPlaced,
summaries.reduce((curr, next) => (curr.blitz?.stats.inputs??-1) < (next.blitz?.stats.inputs??-1) ? curr : next).blitz?.stats.inputs,
summaries.reduce((curr, next) => (curr.blitz?.stats.kpp??-1) < (next.blitz?.stats.kpp??-1) ? curr : next).blitz?.stats.kpp,
summaries.reduce((curr, next) => (curr.blitz?.stats.pps??-1) > (next.blitz?.stats.pps??-1) ? curr : next).blitz?.stats.pps,
summaries.reduce((curr, next) => (curr.blitz?.stats.kps??-1) > (next.blitz?.stats.kps??-1) ? curr : next).blitz?.stats.kps,
],
[
summaries.reduce((curr, next) => curr.zen.score > next.zen.score ? curr : next).zen.score,
summaries.reduce((curr, next) => curr.zen.level > next.zen.level ? curr : next).zen.level,
]
];
}
void getSummariesForInit() async { void getSummariesForInit() async {
summaries.add(await teto.fetchSummaries(widget.initPlayer.userId)); summaries.add(await teto.fetchSummaries(widget.initPlayer.userId));
nicknames.add(players[0].username); if (summaries[0].league.nerdStats != null) nicknames.add(players[0].username);
addvaluesEntrys(players.first, summaries.first);
best = recalculateBestEntries();
setState(() { setState(() {
}); });
@ -78,7 +551,9 @@ class CompareState extends State<CompareView> {
void addPlayer(String nickname) async { void addPlayer(String nickname) async {
players.add(await teto.fetchPlayer(nickname)); players.add(await teto.fetchPlayer(nickname));
summaries.add(await teto.fetchSummaries(players.last.userId)); summaries.add(await teto.fetchSummaries(players.last.userId));
nicknames.add(players.last.username); addvaluesEntrys(players.last, summaries.last);
best = recalculateBestEntries();
if (summaries.last.league.nerdStats != null) nicknames.add(players.last.username);
setState(() { setState(() {
}); });
@ -144,43 +619,10 @@ class CompareState extends State<CompareView> {
SizedBox(width: 300, child: AddNewColumnCard(addPlayer)) SizedBox(width: 300, child: AddNewColumnCard(addPlayer))
] ]
), ),
Row( for (int i = 0; i < formattedValues.length; i++) SizedBox(
children: [
SizedBox(
width: 300.0,
child: Card(
child: Column(children: [
Text("Registration Date"),
Text("XP"),
Text("Time Played"),
Text("Online Games Played"),
Text("Online Games Won"),
Text("Followers"),
]),
),
),
for (var p in players) SizedBox(
width: 300.0,
child: Card(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(timestamp(p.registrationTime!)),
RichText(text: p.xp.isNegative ? TextSpan(text: "hidden", style: TextStyle(fontFamily: "Eurostile Round", color: Colors.grey)) : TextSpan(text: intf.format(p.xp), style: TextStyle(fontFamily: "Eurostile Round"), children: [TextSpan(text: " (lvl ${intf.format(p.level.floor())})", style: TextStyle(color: Colors.grey))])),
Text(p.gameTime.isNegative ? "hidden" : playtime(p.gameTime), style: TextStyle(color: p.gameTime.isNegative ? Colors.grey : Colors.white)),
Text(p.gamesPlayed.isNegative ? "hidden" : intf.format(p.gamesPlayed), style: TextStyle(color: p.gamesPlayed.isNegative ? Colors.grey : Colors.white)),
Text(p.gamesWon.isNegative ? "hidden" : intf.format(p.gamesWon), style: TextStyle(color: p.gamesWon.isNegative ? Colors.grey : Colors.white)),
Text(intf.format(p.friendCount))
],
),
),
),
]
),
SizedBox(
width: 300+300*summaries.length.toDouble(), width: 300+300*summaries.length.toDouble(),
child: ExpansionTile( child: ExpansionTile(
title: Text("Tetra League", style: _expansionTileTitleTextStyle), title: Text(TitesForStats.keys.elementAt(i), style: _expansionTileTitleTextStyle),
children: [ children: [
Row( Row(
children: [ children: [
@ -188,248 +630,27 @@ class CompareState extends State<CompareView> {
width: 300.0, width: 300.0,
child: Card( child: Card(
child: Column(children: [ child: Column(children: [
Text("Tetra Rating"), for (String title in TitesForStats[TitesForStats.keys.elementAt(i)]!) Text(title),
Text("Glicko"),
Text("RD"),
Text("GLIXARE"),
Text("S1-like TR"),
Text("Position"),
Text("Position (Country)"),
Text("Games Played"),
Text("Games Won"),
Text("Winrate"),
Text("Attack Per Minute"),
Text("Pieces Per Second"),
Text("Versus Score"),
Text("Nerd Stats"),
Text("Attack Per Piece"),
Text("VS / APM"),
Text("Downstack Per Second"),
Text("Downstack Per Piece"),
Text("APP + DSP"),
Text("Cheese Index"),
Text("Garbage Efficiency"),
Text("Weighted APP"),
Text("Area"),
Text("Playstyle"),
Text("Opener"),
Text("Plonk"),
Text("Stride"),
Text("Infinite Downstack"),
]), ]),
), ),
), ),
for (var s in summaries) SizedBox( for (int k = 0; k < formattedValues[i].length; k++) SizedBox(
width: 300.0, width: 300.0,
child: Card( child: Card(
child: Column( child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Text(s.league.tr.isNegative ? "---" : f4.format(s.league.tr)), for (int l = 0; l < formattedValues[i][k].length; l++) Container(decoration: BoxDecoration(color: (rawValues[i][k][l] != null && best[i][l] == rawValues[i][k][l]) ? Colors.cyanAccent.withAlpha(96) : null), child: formattedValues[i][k][l]),
Text(s.league.glicko!.isNegative ? "---" : f4.format(s.league.glicko)),
Text(s.league.rd!.isNegative ? "---" : f4.format(s.league.rd), style: TextStyle(color: s.league.rd!.isNegative ? Colors.grey : Colors.white)),
Text(s.league.gxe.isNegative ? "---" : f4.format(s.league.gxe)),
Text(s.league.s1tr.isNegative ? "---" : f4.format(s.league.s1tr)),
Text(s.league.standing.isNegative ? "---" : ""+intf.format(s.league.standing)),
Text(s.league.standingLocal.isNegative ? "---" : ""+intf.format(s.league.standingLocal)),
// RichText(text: s.league.standingLocal.isNegative ? TextSpan(text: "---", style: TextStyle(fontFamily: "Eurostile Round", color: Colors.grey)) : TextSpan(text: intf.format(s.league.standingLocal), style: TextStyle(fontFamily: "Eurostile Round"), children: [TextSpan(text: " (in ${s.league.})", style: TextStyle(color: Colors.grey))]))
Text(intf.format(s.league.gamesPlayed)),
Text(intf.format(s.league.gamesWon)),
Text(s.league.winrate.isNaN ? "---" : f4.format(s.league.winrate*100)+"%"),
Text(s.league.apm != null ? f2.format(s.league.apm) : "---"),
Text(s.league.pps != null ? f2.format(s.league.pps) : "---"),
Text(s.league.vs != null ? f2.format(s.league.vs) : "---"),
Text(""),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.app) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.vsapm) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.dss) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.dsp) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.appdsp) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.cheese) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.gbe) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.nyaapp) : "---"),
Text(s.league.nerdStats != null ? f4.format(s.league.nerdStats!.area) : "---"),
Text(""),
Text(s.league.playstyle != null ? f4.format(s.league.playstyle!.opener) : "---"),
Text(s.league.playstyle != null ? f4.format(s.league.playstyle!.plonk) : "---"),
Text(s.league.playstyle != null ? f4.format(s.league.playstyle!.stride) : "---"),
Text(s.league.playstyle != null ? f4.format(s.league.playstyle!.infds) : "---"),
], ],
), ),
), ),
), ),
] ]
), ),
VsGraphs(stats: [for (var s in summaries) AggregateStats.precalculated(s.league.apm??0, s.league.pps??0, s.league.vs??0, s.league.nerdStats??NerdStats(0, 0, 0), s.league.playstyle??Playstyle(0, 0, 0, 0, 0, 0, 0.0001, 0))], nicknames: nicknames) //VsGraphs(stats: [for (var s in summaries) if (s.league.nerdStats != null) AggregateStats.precalculated(s.league.apm!, s.league.pps!, s.league.vs!, s.league.nerdStats!, s.league.playstyle!)], nicknames: nicknames)
], ],
), ),
), ),
SizedBox(
width: 300+300*summaries.length.toDouble(),
child: ExpansionTile(
title: Text("Quick Play", style: _expansionTileTitleTextStyle),
children: [
Row(
children: [
SizedBox(
width: 300.0,
child: Card(
child: Column(children: [
Text("Altitude"),
Text("Position"),
Text("Position (Country)"),
Text("Attack Per Minute"),
Text("Pieces Per Second"),
Text("Versus Score"),
Text("KO's"),
Text("Top B2B"),
Text("Climb Speed"),
Text("Peak Climb Speed"),
Text("Time Spend"),
Text("Finesse"),
Text("Nerd Stats"),
Text("Attack Per Piece"),
Text("VS / APM"),
Text("Downstack Per Second"),
Text("Downstack Per Piece"),
Text("APP + DSP"),
Text("Cheese Index"),
Text("Garbage Efficiency"),
Text("Weighted APP"),
Text("Area"),
Text("Playstyle"),
Text("Opener"),
Text("Plonk"),
Text("Stride"),
Text("Infinite Downstack"),
]),
),
),
for (var s in summaries) SizedBox(
width: 300.0,
child: Card(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(s.zenith != null ? f4.format(s.zenith!.stats.zenith!.altitude) : "---"),
Text(s.zenith != null ? ""+intf.format(s.zenith!.rank) : "---"),
Text((s.zenith != null && !s.zenith!.countryRank.isNegative) ? ""+intf.format(s.zenith!.countryRank) : "---"),
Text(s.zenith != null ? f2.format(s.zenith!.aggregateStats.apm) : "---"),
Text(s.zenith != null ? f2.format(s.zenith!.aggregateStats.pps) : "---"),
Text(s.zenith != null ? f2.format(s.zenith!.aggregateStats.vs) : "---"),
Text(s.zenith != null ? intf.format(s.zenith!.stats.kills) : "---"),
Text(s.zenith != null ? intf.format(s.zenith!.stats.topBtB) : "---"),
Text(s.zenith != null ? f4.format(s.zenith!.stats.cps) : "---"),
Text(s.zenith != null ? f4.format(s.zenith!.stats.zenith!.peakrank) : "---"),
Text(s.zenith != null ? getMoreNormalTime(s.zenith!.stats.finalTime) : "---"),
Text(s.zenith != null ? f2.format(s.zenith!.stats.finessePercentage*100)+"%" : "---"),
Text(""),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.app) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.vsapm) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.dss) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.dsp) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.appdsp) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.cheese) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.gbe) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.nyaapp) : "---"),
Text(s.zenith?.aggregateStats.nerdStats != null ? f4.format(s.zenith!.aggregateStats.nerdStats.area) : "---"),
Text(""),
Text(s.zenith?.aggregateStats.playstyle != null ? f4.format(s.zenith!.aggregateStats.playstyle.opener) : "---"),
Text(s.zenith?.aggregateStats.playstyle != null ? f4.format(s.zenith!.aggregateStats.playstyle.plonk) : "---"),
Text(s.zenith?.aggregateStats.playstyle != null ? f4.format(s.zenith!.aggregateStats.playstyle.stride) : "---"),
Text(s.zenith?.aggregateStats.playstyle != null ? f4.format(s.zenith!.aggregateStats.playstyle.infds) : "---"),
],
),
),
),
]
)
],
),
),
SizedBox(
width: 300+300*summaries.length.toDouble(),
child: ExpansionTile(
title: Text("Quick Play Expert", style: _expansionTileTitleTextStyle),
children: [
Row(
children: [
SizedBox(
width: 300.0,
child: Card(
child: Column(children: [
Text("Altitude"),
Text("Position"),
Text("Position (Country)"),
Text("Attack Per Minute"),
Text("Pieces Per Second"),
Text("Versus Score"),
Text("KO's"),
Text("Top B2B"),
Text("Climb Speed"),
Text("Peak Climb Speed"),
Text("Time Spend"),
Text("Finesse"),
Text("Nerd Stats"),
Text("Attack Per Piece"),
Text("VS / APM"),
Text("Downstack Per Second"),
Text("Downstack Per Piece"),
Text("APP + DSP"),
Text("Cheese Index"),
Text("Garbage Efficiency"),
Text("Weighted APP"),
Text("Area"),
Text("Playstyle"),
Text("Opener"),
Text("Plonk"),
Text("Stride"),
Text("Infinite Downstack"),
]),
),
),
for (var s in summaries) SizedBox(
width: 300.0,
child: Card(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Text(s.zenithEx != null ? f4.format(s.zenithEx!.stats.zenith!.altitude) : "---"),
Text(s.zenithEx != null ? ""+intf.format(s.zenithEx!.rank) : "---"),
Text((s.zenithEx != null && !s.zenithEx!.countryRank.isNegative) ? ""+intf.format(s.zenithEx!.countryRank) : "---"),
Text(s.zenithEx != null ? f2.format(s.zenithEx!.aggregateStats.apm) : "---"),
Text(s.zenithEx != null ? f2.format(s.zenithEx!.aggregateStats.pps) : "---"),
Text(s.zenithEx != null ? f2.format(s.zenithEx!.aggregateStats.vs) : "---"),
Text(s.zenithEx != null ? intf.format(s.zenithEx!.stats.kills) : "---"),
Text(s.zenithEx != null ? intf.format(s.zenithEx!.stats.topBtB) : "---"),
Text(s.zenithEx != null ? f4.format(s.zenithEx!.stats.cps) : "---"),
Text(s.zenithEx != null ? f4.format(s.zenithEx!.stats.zenith!.peakrank) : "---"),
Text(s.zenithEx != null ? getMoreNormalTime(s.zenithEx!.stats.finalTime) : "---"),
Text(s.zenithEx != null ? f2.format(s.zenithEx!.stats.finessePercentage*100)+"%" : "---"),
Text(""),
Text(s.zenithEx?.aggregateStats.nerdStats != null ? f4.format(s.zenithEx!.aggregateStats.nerdStats.app) : "---"),
Text(s.zenithEx?.aggregateStats.nerdStats != null ? f4.format(s.zenithEx!.aggregateStats.nerdStats.vsapm) : "---"),
Text(s.zenithEx?.aggregateStats.nerdStats != null ? f4.format(s.zenithEx!.aggregateStats.nerdStats.dss) : "---"),
Text(s.zenithEx?.aggregateStats.nerdStats != null ? f4.format(s.zenithEx!.aggregateStats.nerdStats.dsp) : "---"),
Text(s.zenithEx?.aggregateStats.nerdStats != null ? f4.format(s.zenithEx!.aggregateStats.nerdStats.appdsp) : "---"),
Text(s.zenithEx?.aggregateStats.nerdStats != null ? f4.format(s.zenithEx!.aggregateStats.nerdStats.cheese) : "---"),
Text(s.zenithEx?.aggregateStats.nerdStats != null ? f4.format(s.zenithEx!.aggregateStats.nerdStats.gbe) : "---"),
Text(s.zenithEx?.aggregateStats.nerdStats != null ? f4.format(s.zenithEx!.aggregateStats.nerdStats.nyaapp) : "---"),
Text(s.zenithEx?.aggregateStats.nerdStats != null ? f4.format(s.zenithEx!.aggregateStats.nerdStats.area) : "---"),
Text(""),
Text(s.zenithEx?.aggregateStats.playstyle != null ? f4.format(s.zenithEx!.aggregateStats.playstyle.opener) : "---"),
Text(s.zenithEx?.aggregateStats.playstyle != null ? f4.format(s.zenithEx!.aggregateStats.playstyle.plonk) : "---"),
Text(s.zenithEx?.aggregateStats.playstyle != null ? f4.format(s.zenithEx!.aggregateStats.playstyle.stride) : "---"),
Text(s.zenithEx?.aggregateStats.playstyle != null ? f4.format(s.zenithEx!.aggregateStats.playstyle.infds) : "---"),
],
),
),
),
]
),
],
),
)
]), ]),
], ],
), ),
@ -592,7 +813,8 @@ class VsGraphs extends StatelessWidget{
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Column( return Card(
child: Column(
children: [ children: [
Wrap( Wrap(
direction: Axis.horizontal, direction: Axis.horizontal,
@ -820,6 +1042,7 @@ class VsGraphs extends StatelessWidget{
], ],
), ),
], ],
),
); );
} }
} }