Ability to compare player with APM-PPS-VS stats
Whole compare view was revamped
This commit is contained in:
parent
03bc46e4bc
commit
26c51823e7
|
@ -14,8 +14,8 @@
|
|||
- ~~Ability to compare player with himself in past~~
|
||||
- ~~Tetra League matches history~~
|
||||
- ~~Tetra League historic charts for tracked players~~
|
||||
- ~~Better UI with delta and hints for stats~~ *v0.2.0, we are here* *dev build are here*
|
||||
- Ability to compare player with APM-PPS-VS stats
|
||||
- ~~Better UI with delta and hints for stats~~ *v0.2.0, we are here*
|
||||
- ~~Ability to compare player with APM-PPS-VS stats~~ *dev build are here*
|
||||
- Ability to fetch Tetra League leaderboard
|
||||
- Average stats for ranks
|
||||
- Ability to compare player with avgRank
|
||||
|
|
|
@ -690,7 +690,11 @@ class TetraLeagueAlpha {
|
|||
this.apm,
|
||||
this.pps,
|
||||
this.vs,
|
||||
this.records});
|
||||
this.records}){
|
||||
nerdStats = (apm != null && pps != null && apm != null) ? NerdStats(apm!, pps!, vs!) : null;
|
||||
estTr = (nerdStats != null) ? EstTr(apm!, pps!, vs!, (rd != null) ? rd! : 69, nerdStats!.app, nerdStats!.dss, nerdStats!.dsp, nerdStats!.gbe) : null;
|
||||
playstyle =(nerdStats != null) ? Playstyle(apm!, pps!, nerdStats!.app, nerdStats!.vsapm, nerdStats!.dsp, nerdStats!.gbe, estTr!.srarea, estTr!.statrank) : null;
|
||||
}
|
||||
|
||||
double get winrate => gamesWon / gamesPlayed;
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -140,18 +140,18 @@ class SettingsState extends State<SettingsView> {
|
|||
var newDB = value.paths[0]!;
|
||||
teto.close().then((value){
|
||||
if(!newDB.endsWith("db")){
|
||||
return ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text("Wrong file type")));
|
||||
return ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Wrong file type")));
|
||||
}
|
||||
getApplicationDocumentsDirectory().then((value){
|
||||
var oldDB = File("${value.path}/TetraStats.db");
|
||||
oldDB.writeAsBytes(File(newDB).readAsBytesSync(), flush: true).then((value){
|
||||
teto.open();
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text("Import successful")));
|
||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Import successful")));
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text("Operation was cancelled")));
|
||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Operation was cancelled")));
|
||||
}
|
||||
});
|
||||
}else{
|
||||
|
@ -167,12 +167,12 @@ class SettingsState extends State<SettingsView> {
|
|||
var oldDB = File("${value.path}/TetraStats.db");
|
||||
oldDB.writeAsBytes(File(newDB).readAsBytesSync()).then((value){
|
||||
teto.open();
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text("Import successful")));
|
||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Import successful")));
|
||||
});
|
||||
});
|
||||
});
|
||||
} else {
|
||||
ScaffoldMessenger.of(context).showSnackBar(SnackBar(content: Text("Operation was cancelled")));
|
||||
ScaffoldMessenger.of(context).showSnackBar(const SnackBar(content: Text("Operation was cancelled")));
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
|
@ -152,7 +152,7 @@ class UserThingy extends StatelessWidget {
|
|||
Navigator.push(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) => CompareView(greenSide: player, redSide: null),
|
||||
builder: (context) => CompareView(greenSide: [player, null, player.tlSeason1], redSide: const [null, null, null], greenMode: Mode.player, redMode: Mode.player),
|
||||
),
|
||||
);
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue