Some `TextStyle`s was moved into themes, button fully animated
Also some bugfix and plans on animating Default Nickname setting
This commit is contained in:
parent
bf87f3a8e5
commit
c12d450884
|
@ -32,6 +32,12 @@ ThemeData theme = ThemeData(
|
||||||
surface: Color.fromARGB(255, 10, 10, 10),
|
surface: Color.fromARGB(255, 10, 10, 10),
|
||||||
secondary: Color(0xFF00838F),
|
secondary: Color(0xFF00838F),
|
||||||
),
|
),
|
||||||
|
textTheme: TextTheme(
|
||||||
|
titleLarge: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42),
|
||||||
|
titleSmall: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 28, height: 0.9, fontWeight: FontWeight.w200),
|
||||||
|
headlineMedium: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 36),
|
||||||
|
displayLarge: TextStyle(fontSize: 18),
|
||||||
|
),
|
||||||
cardTheme: const CardTheme(surfaceTintColor: Color.fromARGB(255, 10, 10, 10)),
|
cardTheme: const CardTheme(surfaceTintColor: Color.fromARGB(255, 10, 10, 10)),
|
||||||
drawerTheme: const DrawerThemeData(surfaceTintColor: Color.fromARGB(255, 10, 10, 10)),
|
drawerTheme: const DrawerThemeData(surfaceTintColor: Color.fromARGB(255, 10, 10, 10)),
|
||||||
searchBarTheme: const SearchBarThemeData(
|
searchBarTheme: const SearchBarThemeData(
|
||||||
|
@ -56,6 +62,7 @@ ThemeData theme = ThemeData(
|
||||||
expansionAnimationStyle: AnimationStyle(curve: Easing.standard, reverseCurve: Easing.standard),
|
expansionAnimationStyle: AnimationStyle(curve: Easing.standard, reverseCurve: Easing.standard),
|
||||||
expandedAlignment: Alignment.bottomCenter,
|
expandedAlignment: Alignment.bottomCenter,
|
||||||
),
|
),
|
||||||
|
dropdownMenuTheme: DropdownMenuThemeData(textStyle: TextStyle(fontFamily: "Eurostile Round", fontSize: 18)),
|
||||||
scaffoldBackgroundColor: Colors.black
|
scaffoldBackgroundColor: Colors.black
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -188,7 +188,7 @@ class _DestinationCalculatorState extends State<DestinationCalculator> {
|
||||||
padding: const EdgeInsets.only(bottom: 8.0),
|
padding: const EdgeInsets.only(bottom: 8.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text("Stats Calucator", style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42)),
|
Text("Stats Calucator", style: Theme.of(context).textTheme.titleLarge),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
@ -281,7 +281,7 @@ class _DestinationCalculatorState extends State<DestinationCalculator> {
|
||||||
decoration: InputDecoration(hintText: "5"),
|
decoration: InputDecoration(hintText: "5"),
|
||||||
onChanged: (value) => customClearsChoice[key] = int.parse(value),
|
onChanged: (value) => customClearsChoice[key] = int.parse(value),
|
||||||
)),
|
)),
|
||||||
Text(" Lines", style: TextStyle(fontSize: 18)),
|
Text(" Lines", style: Theme.of(context).textTheme.displayLarge),
|
||||||
Icon(Icons.arrow_forward_ios)
|
Icon(Icons.arrow_forward_ios)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -353,7 +353,7 @@ class _DestinationCalculatorState extends State<DestinationCalculator> {
|
||||||
padding: const EdgeInsets.only(bottom: 8.0),
|
padding: const EdgeInsets.only(bottom: 8.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text("Damage Calucator", style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42)),
|
Text("Damage Calucator", style: Theme.of(context).textTheme.titleLarge),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
|
|
@ -75,7 +75,7 @@ class _DestinationCutoffsState extends State<DestinationCutoffs> {
|
||||||
padding: const EdgeInsets.only(bottom: 8.0),
|
padding: const EdgeInsets.only(bottom: 8.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text("Tetra League State", style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42)),
|
Text("Tetra League State", style: Theme.of(context).textTheme.titleLarge),
|
||||||
Text("as of ${timestamp(snapshot.data!.timestamp)}"),
|
Text("as of ${timestamp(snapshot.data!.timestamp)}"),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -145,7 +145,7 @@ class LeagueCard extends StatelessWidget{
|
||||||
crossAxisAlignment: CrossAxisAlignment.baseline,
|
crossAxisAlignment: CrossAxisAlignment.baseline,
|
||||||
textBaseline: TextBaseline.alphabetic,
|
textBaseline: TextBaseline.alphabetic,
|
||||||
children: [
|
children: [
|
||||||
Text("Season ${league.season}", style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 28, height: 0.9)),
|
Text("Season ${league.season}", style: Theme.of(context).textTheme.titleSmall),
|
||||||
Spacer(),
|
Spacer(),
|
||||||
Text(
|
Text(
|
||||||
"${seasonStarts.elementAtOrNull(league.season - 1) != null ? timestamp(seasonStarts[league.season - 1]) : "---"} — ${seasonEnds.elementAtOrNull(league.season - 1) != null ? timestamp(seasonEnds[league.season - 1]) : "---"}",
|
"${seasonStarts.elementAtOrNull(league.season - 1) != null ? timestamp(seasonStarts[league.season - 1]) : "---"} — ${seasonEnds.elementAtOrNull(league.season - 1) != null ? timestamp(seasonEnds[league.season - 1]) : "---"}",
|
||||||
|
@ -153,7 +153,7 @@ class LeagueCard extends StatelessWidget{
|
||||||
style: TextStyle(color: Colors.grey)),
|
style: TextStyle(color: Colors.grey)),
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
else Text("Tetra League", style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 28, height: 0.9)),
|
else Text("Tetra League", style: Theme.of(context).textTheme.titleSmall),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
TLRatingThingy(userID: "", tlData: league, showPositions: true),
|
TLRatingThingy(userID: "", tlData: league, showPositions: true),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
@ -209,7 +209,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const Text("40 Lines", style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 28, height: 0.9)),
|
Text("40 Lines", style: Theme.of(context).textTheme.titleSmall),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
RecordSummary(record: summaries.sprint, betterThanClosestAverage: sprintBetterThanClosestAverage, betterThanRankAverage: sprintBetterThanRankAverage, closestAverage: closestAverageSprint, rank: summaries.league.percentileRank),
|
RecordSummary(record: summaries.sprint, betterThanClosestAverage: sprintBetterThanClosestAverage, betterThanRankAverage: sprintBetterThanRankAverage, closestAverage: closestAverageSprint, rank: summaries.league.percentileRank),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
@ -226,7 +226,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const Text("Blitz", style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 28, height: 0.9)),
|
Text("Blitz", style: Theme.of(context).textTheme.titleSmall),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
RecordSummary(record: summaries.blitz, betterThanClosestAverage: blitzBetterThanClosestAverage, betterThanRankAverage: blitzBetterThanRankAverage, closestAverage: closestAverageBlitz, rank: summaries.league.percentileRank),
|
RecordSummary(record: summaries.blitz, betterThanClosestAverage: blitzBetterThanClosestAverage, betterThanRankAverage: blitzBetterThanRankAverage, closestAverage: closestAverageBlitz, rank: summaries.league.percentileRank),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
@ -248,7 +248,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const Text("QP", style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 28, height: 0.9)),
|
Text("QP", style: Theme.of(context).textTheme.titleSmall),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
RecordSummary(record: summaries.zenith, hideRank: true),
|
RecordSummary(record: summaries.zenith, hideRank: true),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
@ -265,7 +265,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const Text("QP Expert", style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 28, height: 0.9)),
|
Text("QP Expert", style: Theme.of(context).textTheme.titleSmall),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
RecordSummary(record: summaries.zenithEx, hideRank: true,),
|
RecordSummary(record: summaries.zenithEx, hideRank: true,),
|
||||||
const Divider(),
|
const Divider(),
|
||||||
|
@ -287,7 +287,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
child: Column(
|
child: Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
const Text("Zen", style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 28, height: 0.9)),
|
Text("Zen", style: Theme.of(context).textTheme.titleSmall),
|
||||||
Text("Level ${intf.format(summaries.zen.level)}", style: const TextStyle(fontFamily: "Eurostile Round", fontSize: 36, fontWeight: FontWeight.w500, color: Colors.white)),
|
Text("Level ${intf.format(summaries.zen.level)}", style: const TextStyle(fontFamily: "Eurostile Round", fontSize: 36, fontWeight: FontWeight.w500, color: Colors.white)),
|
||||||
Text("Score ${intf.format(summaries.zen.score)}"),
|
Text("Score ${intf.format(summaries.zen.score)}"),
|
||||||
Text("Level up requirement: ${intf.format(summaries.zen.scoreRequirement)}", style: const TextStyle(color: Colors.grey))
|
Text("Level up requirement: ${intf.format(summaries.zen.scoreRequirement)}", style: const TextStyle(color: Colors.grey))
|
||||||
|
@ -386,7 +386,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(t.tetraLeague, style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42)),
|
Text(t.tetraLeague, style: Theme.of(context).textTheme.titleLarge),
|
||||||
//Text("${states.last.timestamp} ${states.last.tr}", textAlign: TextAlign.center)
|
//Text("${states.last.timestamp} ${states.last.tr}", textAlign: TextAlign.center)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -400,7 +400,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Text(t.nerdStats, style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42)),
|
Text(t.nerdStats, style: Theme.of(context).textTheme.titleLarge),
|
||||||
const Spacer()
|
const Spacer()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -422,7 +422,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text("Previous Seasons", style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42)),
|
Text("Previous Seasons", style: Theme.of(context).textTheme.titleLarge),
|
||||||
//Text("${t.seasonStarts} ${countdown(postSeasonLeft)}", textAlign: TextAlign.center)
|
//Text("${t.seasonStarts} ${countdown(postSeasonLeft)}", textAlign: TextAlign.center)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -504,7 +504,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
"zenithex" => "${f2.format(snapshot.data!.records[i].stats.zenith!.altitude)} m${(snapshot.data!.records[i].extras as ZenithExtras).mods.isNotEmpty ? " (${t.withModsPlural(n: (snapshot.data!.records[i].extras as ZenithExtras).mods.length)})" : ""}",
|
"zenithex" => "${f2.format(snapshot.data!.records[i].stats.zenith!.altitude)} m${(snapshot.data!.records[i].extras as ZenithExtras).mods.isNotEmpty ? " (${t.withModsPlural(n: (snapshot.data!.records[i].extras as ZenithExtras).mods.length)})" : ""}",
|
||||||
String() => "huh",
|
String() => "huh",
|
||||||
},
|
},
|
||||||
style: const TextStyle(fontSize: 18)),
|
style: Theme.of(context).textTheme.displayLarge),
|
||||||
subtitle: Text(timestamp(snapshot.data!.records[i].timestamp), style: const TextStyle(color: Colors.grey, height: 0.85)),
|
subtitle: Text(timestamp(snapshot.data!.records[i].timestamp), style: const TextStyle(color: Colors.grey, height: 0.85)),
|
||||||
trailing: SpTrailingStats(snapshot.data!.records[i], snapshot.data!.records[i].gamemode)
|
trailing: SpTrailingStats(snapshot.data!.records[i], snapshot.data!.records[i].gamemode)
|
||||||
)
|
)
|
||||||
|
@ -543,7 +543,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
"zenithex" => "${f2.format(snapshot.data!.records[i].stats.zenith!.altitude)} m${(snapshot.data!.records[i].extras as ZenithExtras).mods.isNotEmpty ? " (${t.withModsPlural(n: (snapshot.data!.records[i].extras as ZenithExtras).mods.length)})" : ""}",
|
"zenithex" => "${f2.format(snapshot.data!.records[i].stats.zenith!.altitude)} m${(snapshot.data!.records[i].extras as ZenithExtras).mods.isNotEmpty ? " (${t.withModsPlural(n: (snapshot.data!.records[i].extras as ZenithExtras).mods.length)})" : ""}",
|
||||||
String() => "huh",
|
String() => "huh",
|
||||||
},
|
},
|
||||||
style: const TextStyle(fontSize: 18)),
|
style: Theme.of(context).textTheme.displayLarge),
|
||||||
subtitle: Text(timestamp(snapshot.data!.records[i].timestamp), style: const TextStyle(color: Colors.grey, height: 0.85)),
|
subtitle: Text(timestamp(snapshot.data!.records[i].timestamp), style: const TextStyle(color: Colors.grey, height: 0.85)),
|
||||||
trailing: SpTrailingStats(snapshot.data!.records[i], snapshot.data!.records[i].gamemode)
|
trailing: SpTrailingStats(snapshot.data!.records[i], snapshot.data!.records[i].gamemode)
|
||||||
)
|
)
|
||||||
|
@ -577,7 +577,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(t.recent, style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42)),
|
Text(t.recent, style: Theme.of(context).textTheme.titleLarge),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -618,7 +618,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
crossAxisAlignment: CrossAxisAlignment.center,
|
crossAxisAlignment: CrossAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
Text(t.quickPlay, style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42)),
|
Text(t.quickPlay, style: Theme.of(context).textTheme.titleLarge),
|
||||||
//Text("Leaderboard reset in ${countdown(postSeasonLeft)}", textAlign: TextAlign.center),
|
//Text("Leaderboard reset in ${countdown(postSeasonLeft)}", textAlign: TextAlign.center),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -704,7 +704,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
const Spacer(),
|
const Spacer(),
|
||||||
Text(t.nerdStats, style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42)),
|
Text(t.nerdStats, style: Theme.of(context).textTheme.titleLarge),
|
||||||
const Spacer()
|
const Spacer()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -736,7 +736,7 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
"blitz" => t.blitz,
|
"blitz" => t.blitz,
|
||||||
"5mblast" => "5,000,000 Blast",
|
"5mblast" => "5,000,000 Blast",
|
||||||
_ => record.gamemode
|
_ => record.gamemode
|
||||||
}, style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42))
|
}, style: Theme.of(context).textTheme.titleLarge)
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -986,10 +986,16 @@ class _DestinationHomeState extends State<DestinationHome> with SingleTickerProv
|
||||||
if (snapshot.data!.summaries!.sprint != null) {
|
if (snapshot.data!.summaries!.sprint != null) {
|
||||||
closestAverageSprint = sprintAverages.entries.singleWhere((element) => element.value == sprintAverages.values.reduce((a, b) => (a-snapshot.data!.summaries!.sprint!.stats.finalTime).abs() < (b -snapshot.data!.summaries!.sprint!.stats.finalTime).abs() ? a : b));
|
closestAverageSprint = sprintAverages.entries.singleWhere((element) => element.value == sprintAverages.values.reduce((a, b) => (a-snapshot.data!.summaries!.sprint!.stats.finalTime).abs() < (b -snapshot.data!.summaries!.sprint!.stats.finalTime).abs() ? a : b));
|
||||||
sprintBetterThanClosestAverage = snapshot.data!.summaries!.sprint!.stats.finalTime < closestAverageSprint!.value;
|
sprintBetterThanClosestAverage = snapshot.data!.summaries!.sprint!.stats.finalTime < closestAverageSprint!.value;
|
||||||
|
} else {
|
||||||
|
closestAverageSprint = sprintAverages.entries.last;
|
||||||
|
sprintBetterThanClosestAverage = false;
|
||||||
}
|
}
|
||||||
if (snapshot.data!.summaries!.blitz != null){
|
if (snapshot.data!.summaries!.blitz != null){
|
||||||
closestAverageBlitz = blitzAverages.entries.singleWhere((element) => element.value == blitzAverages.values.reduce((a, b) => (a-snapshot.data!.summaries!.blitz!.stats.score).abs() < (b -snapshot.data!.summaries!.blitz!.stats.score).abs() ? a : b));
|
closestAverageBlitz = blitzAverages.entries.singleWhere((element) => element.value == blitzAverages.values.reduce((a, b) => (a-snapshot.data!.summaries!.blitz!.stats.score).abs() < (b -snapshot.data!.summaries!.blitz!.stats.score).abs() ? a : b));
|
||||||
blitzBetterThanClosestAverage = snapshot.data!.summaries!.blitz!.stats.score > closestAverageBlitz!.value;
|
blitzBetterThanClosestAverage = snapshot.data!.summaries!.blitz!.stats.score > closestAverageBlitz!.value;
|
||||||
|
} else {
|
||||||
|
closestAverageBlitz = blitzAverages.entries.last;
|
||||||
|
blitzBetterThanClosestAverage = false;
|
||||||
}
|
}
|
||||||
return TweenAnimationBuilder(
|
return TweenAnimationBuilder(
|
||||||
duration: Durations.long4,
|
duration: Durations.long4,
|
||||||
|
|
|
@ -114,12 +114,12 @@ class _DestinationLeaderboardsState extends State<DestinationLeaderboards> {
|
||||||
height: widget.constraints.maxHeight,
|
height: widget.constraints.maxHeight,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const Card(
|
Card(
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Spacer(),
|
Spacer(),
|
||||||
Text("Leaderboards", style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 36)),
|
Text("Leaderboards", style: Theme.of(context).textTheme.headlineMedium),
|
||||||
Spacer()
|
Spacer()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -162,7 +162,7 @@ class _DestinationLeaderboardsState extends State<DestinationLeaderboards> {
|
||||||
if (snapshot.hasData){
|
if (snapshot.hasData){
|
||||||
return Column(
|
return Column(
|
||||||
children: [
|
children: [
|
||||||
Text(leaderboards[_currentLb]!, style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 28, height: 0.9)),
|
Text(leaderboards[_currentLb]!, style: Theme.of(context).textTheme.titleSmall),
|
||||||
Row(
|
Row(
|
||||||
mainAxisAlignment: MainAxisAlignment.center,
|
mainAxisAlignment: MainAxisAlignment.center,
|
||||||
children: [
|
children: [
|
||||||
|
|
|
@ -75,12 +75,12 @@ class _DestinationSavedData extends State<DestinationSavedData> {
|
||||||
width: 450,
|
width: 450,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const Card(
|
Card(
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Spacer(),
|
Spacer(),
|
||||||
Text("Saved Data", style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 36)),
|
Text("Saved Data", style: Theme.of(context).textTheme.headlineMedium),
|
||||||
Spacer()
|
Spacer()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
|
|
@ -1220,7 +1220,7 @@ class _TwoRecordsThingy extends StatelessWidget {
|
||||||
onTap: () => Navigator.push(context, MaterialPageRoute(builder: (context) => SingleplayerRecordView(record: sprintStream.records[i]))),
|
onTap: () => Navigator.push(context, MaterialPageRoute(builder: (context) => SingleplayerRecordView(record: sprintStream.records[i]))),
|
||||||
leading: Text("#${i+1}", style: const TextStyle(fontFamily: "Eurostile Round", fontSize: 28, shadows: textShadow, height: 0.9) ),
|
leading: Text("#${i+1}", style: const TextStyle(fontFamily: "Eurostile Round", fontSize: 28, shadows: textShadow, height: 0.9) ),
|
||||||
title: Text(get40lTime(sprintStream.records[i].stats.finalTime.inMicroseconds),
|
title: Text(get40lTime(sprintStream.records[i].stats.finalTime.inMicroseconds),
|
||||||
style: const TextStyle(fontSize: 18)),
|
style: Theme.of(context).textTheme.displayLarge),
|
||||||
subtitle: Text(timestamp(sprintStream.records[i].timestamp), style: const TextStyle(color: Colors.grey, height: 0.85)),
|
subtitle: Text(timestamp(sprintStream.records[i].timestamp), style: const TextStyle(color: Colors.grey, height: 0.85)),
|
||||||
trailing: SpTrailingStats(sprintStream.records[i], sprintStream.records[i].gamemode)
|
trailing: SpTrailingStats(sprintStream.records[i], sprintStream.records[i].gamemode)
|
||||||
)
|
)
|
||||||
|
@ -1306,7 +1306,7 @@ class _TwoRecordsThingy extends StatelessWidget {
|
||||||
onTap: () => Navigator.push(context, MaterialPageRoute(builder: (context) => SingleplayerRecordView(record: blitzStream.records[i]))),
|
onTap: () => Navigator.push(context, MaterialPageRoute(builder: (context) => SingleplayerRecordView(record: blitzStream.records[i]))),
|
||||||
leading: Text("#${i+1}", style: const TextStyle(fontFamily: "Eurostile Round", fontSize: 28, shadows: textShadow, height: 0.9) ),
|
leading: Text("#${i+1}", style: const TextStyle(fontFamily: "Eurostile Round", fontSize: 28, shadows: textShadow, height: 0.9) ),
|
||||||
title: Text("${NumberFormat.decimalPattern().format(blitzStream.records[i].stats.score)} points",
|
title: Text("${NumberFormat.decimalPattern().format(blitzStream.records[i].stats.score)} points",
|
||||||
style: const TextStyle(fontSize: 18)),
|
style: Theme.of(context).textTheme.displayLarge),
|
||||||
subtitle: Text(timestamp(blitzStream.records[i].timestamp), style: const TextStyle(color: Colors.grey, height: 0.85)),
|
subtitle: Text(timestamp(blitzStream.records[i].timestamp), style: const TextStyle(color: Colors.grey, height: 0.85)),
|
||||||
trailing: SpTrailingStats(blitzStream.records[i], blitzStream.records[i].gamemode)
|
trailing: SpTrailingStats(blitzStream.records[i], blitzStream.records[i].gamemode)
|
||||||
)
|
)
|
||||||
|
@ -1558,7 +1558,7 @@ class _OtherThingy extends StatelessWidget {
|
||||||
children: getDistinguishmentTitle(distinguishment?.header),
|
children: getDistinguishmentTitle(distinguishment?.header),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(getDistinguishmentSubtitle(distinguishment?.footer), style: const TextStyle(fontSize: 18), textAlign: TextAlign.center),
|
Text(getDistinguishmentSubtitle(distinguishment?.footer), style: Theme.of(context).textTheme.displayLarge, textAlign: TextAlign.center),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1568,7 +1568,7 @@ class _OtherThingy extends StatelessWidget {
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text(t.bio, style: TextStyle(fontFamily: "Eurostile Round Extended",fontSize: bigScreen ? 42 : 28)),
|
Text(t.bio, style: TextStyle(fontFamily: "Eurostile Round Extended",fontSize: bigScreen ? 42 : 28)),
|
||||||
MarkdownBody(data: bio!, styleSheet: MarkdownStyleSheet(textScaler: TextScaler.linear(1.5), textAlign: WrapAlignment.center)) // Text(bio!, style: const TextStyle(fontSize: 18)),
|
MarkdownBody(data: bio!, styleSheet: MarkdownStyleSheet(textScaler: TextScaler.linear(1.5), textAlign: WrapAlignment.center)) // Text(bio!, style: const Theme.of(context).textTheme.displayLarge),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1579,7 +1579,7 @@ class _OtherThingy extends StatelessWidget {
|
||||||
children: [
|
children: [
|
||||||
Text(t.zen, style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: bigScreen ? 42 : 28)),
|
Text(t.zen, style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: bigScreen ? 42 : 28)),
|
||||||
Text("${t.statCellNum.level} ${NumberFormat.decimalPattern().format(zen!.level)}", style: const TextStyle(fontSize: 28, fontWeight: FontWeight.bold)),
|
Text("${t.statCellNum.level} ${NumberFormat.decimalPattern().format(zen!.level)}", style: const TextStyle(fontSize: 28, fontWeight: FontWeight.bold)),
|
||||||
Text("${t.statCellNum.score} ${NumberFormat.decimalPattern().format(zen!.score)}", style: const TextStyle(fontSize: 18)),
|
Text("${t.statCellNum.score} ${NumberFormat.decimalPattern().format(zen!.score)}", style: Theme.of(context).textTheme.displayLarge),
|
||||||
Container(
|
Container(
|
||||||
constraints: const BoxConstraints(maxWidth: 300.0),
|
constraints: const BoxConstraints(maxWidth: 300.0),
|
||||||
child: Row(children: [
|
child: Row(children: [
|
||||||
|
@ -1609,7 +1609,7 @@ class _OtherThingy extends StatelessWidget {
|
||||||
physics: const AlwaysScrollableScrollPhysics(),
|
physics: const AlwaysScrollableScrollPhysics(),
|
||||||
itemCount: newsletter!.news.length+1,
|
itemCount: newsletter!.news.length+1,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
return index == 0 ? Center(child: Text(t.news, style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42))) : getNewsTile(newsletter!.news[index-1]);
|
return index == 0 ? Center(child: Text(t.news, style: Theme.of(context).textTheme.titleLarge)) : getNewsTile(newsletter!.news[index-1]);
|
||||||
}
|
}
|
||||||
))
|
))
|
||||||
]
|
]
|
||||||
|
|
|
@ -236,10 +236,9 @@ enum SettingsCardMod{
|
||||||
final String title;
|
final String title;
|
||||||
}
|
}
|
||||||
|
|
||||||
const TextStyle settingsTitlesStyle = TextStyle(fontSize: 18);
|
|
||||||
const EdgeInsets descriptionPadding = EdgeInsets.fromLTRB(12.0, 0.0, 12.0, 8.0);
|
const EdgeInsets descriptionPadding = EdgeInsets.fromLTRB(12.0, 0.0, 12.0, 8.0);
|
||||||
|
|
||||||
class _DestinationSettings extends State<DestinationSettings> {
|
class _DestinationSettings extends State<DestinationSettings> with SingleTickerProviderStateMixin {
|
||||||
SettingsCardMod mod = SettingsCardMod.general;
|
SettingsCardMod mod = SettingsCardMod.general;
|
||||||
List<DropdownMenuItem<AppLocale>> locales = <DropdownMenuItem<AppLocale>>[];
|
List<DropdownMenuItem<AppLocale>> locales = <DropdownMenuItem<AppLocale>>[];
|
||||||
String defaultNickname = "Checking...";
|
String defaultNickname = "Checking...";
|
||||||
|
@ -251,6 +250,8 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
late bool showAverages;
|
late bool showAverages;
|
||||||
late bool updateInBG;
|
late bool updateInBG;
|
||||||
final TextEditingController _playertext = TextEditingController();
|
final TextEditingController _playertext = TextEditingController();
|
||||||
|
late AnimationController _defaultNicknameAnimController;
|
||||||
|
late Animation _defaultNicknameAnim;
|
||||||
|
|
||||||
@override
|
@override
|
||||||
void initState() {
|
void initState() {
|
||||||
|
@ -258,6 +259,18 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
// windowManager.getTitle().then((value) => oldWindowTitle = value);
|
// windowManager.getTitle().then((value) => oldWindowTitle = value);
|
||||||
// windowManager.setTitle("Tetra Stats: ${t.settings}");
|
// windowManager.setTitle("Tetra Stats: ${t.settings}");
|
||||||
// }
|
// }
|
||||||
|
_defaultNicknameAnimController = AnimationController(
|
||||||
|
duration: Durations.extralong4,
|
||||||
|
vsync: this,
|
||||||
|
);
|
||||||
|
_defaultNicknameAnim = new Tween(
|
||||||
|
begin: 0.0,
|
||||||
|
end: 1.0,
|
||||||
|
).animate(new CurvedAnimation(
|
||||||
|
parent: _defaultNicknameAnimController,
|
||||||
|
curve: Cubic(.15,-0.40,.86,-0.39),
|
||||||
|
reverseCurve: Cubic(0,.99,.99,1.01)
|
||||||
|
));
|
||||||
_getPreferences();
|
_getPreferences();
|
||||||
super.initState();
|
super.initState();
|
||||||
}
|
}
|
||||||
|
@ -279,22 +292,26 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
_setDefaultNickname(prefs.getString("player"));
|
_setDefaultNickname(prefs.getString("player"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _setDefaultNickname(String? n) async {
|
Future<bool> _setDefaultNickname(String? n) async {
|
||||||
if (n != null) {
|
if (n != null) {
|
||||||
try {
|
try {
|
||||||
defaultNickname = await teto.getNicknameByID(n);
|
defaultNickname = await teto.getNicknameByID(n);
|
||||||
|
return true;
|
||||||
} on TetrioPlayerNotExist {
|
} on TetrioPlayerNotExist {
|
||||||
defaultNickname = n;
|
defaultNickname = n;
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
defaultNickname = "dan63047";
|
defaultNickname = "dan63047";
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
setState(() {});
|
//setState(() {});
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _setPlayer(String player) async {
|
Future<bool> _setPlayer(String player) async {
|
||||||
await prefs.setString('player', player);
|
bool success = await _setDefaultNickname(player);
|
||||||
await _setDefaultNickname(player);
|
if (success) await prefs.setString('player', player);
|
||||||
|
return success;
|
||||||
}
|
}
|
||||||
|
|
||||||
Future<void> _removePlayer() async {
|
Future<void> _removePlayer() async {
|
||||||
|
@ -310,7 +327,7 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
padding: const EdgeInsets.only(bottom: 8.0),
|
padding: const EdgeInsets.only(bottom: 8.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text(SettingsCardMod.general.title, style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42)),
|
Text(SettingsCardMod.general.title, style: Theme.of(context).textTheme.titleLarge),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
@ -320,11 +337,21 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text("Your account in TETR.IO", style: settingsTitlesStyle),
|
title: Text("Your account in TETR.IO", style: Theme.of(context).textTheme.displayLarge),
|
||||||
trailing: SizedBox(width: 150.0, child: TextField(
|
trailing: SizedBox(width: 150.0, child: AnimatedBuilder(
|
||||||
keyboardType: TextInputType.text,
|
animation: _defaultNicknameAnim,
|
||||||
decoration: InputDecoration(hintText: defaultNickname),
|
builder: (context, child) {
|
||||||
//onChanged: (value) => setState((){rules.surgeInitAtB2b = int.parse(value);}),
|
return TextField(
|
||||||
|
keyboardType: TextInputType.text,
|
||||||
|
decoration: InputDecoration(
|
||||||
|
hintText: defaultNickname,
|
||||||
|
helper: Text("Press Enter to submit", style: TextStyle(color: Colors.grey, height: 0.2)),
|
||||||
|
),
|
||||||
|
onChanged: (value) {
|
||||||
|
_setPlayer(value).then((v) {});
|
||||||
|
},
|
||||||
|
);
|
||||||
|
},
|
||||||
)),
|
)),
|
||||||
),
|
),
|
||||||
Divider(),
|
Divider(),
|
||||||
|
@ -340,7 +367,7 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text("Language", style: settingsTitlesStyle),
|
title: Text("Language", style: Theme.of(context).textTheme.displayLarge),
|
||||||
trailing: DropdownButton(
|
trailing: DropdownButton(
|
||||||
items: locales,
|
items: locales,
|
||||||
value: LocaleSettings.currentLocale,
|
value: LocaleSettings.currentLocale,
|
||||||
|
@ -367,7 +394,7 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text("Update data in the background", style: settingsTitlesStyle),
|
title: Text("Update data in the background", style: Theme.of(context).textTheme.displayLarge),
|
||||||
trailing: Switch(value: updateInBG, onChanged: (bool value){
|
trailing: Switch(value: updateInBG, onChanged: (bool value){
|
||||||
prefs.setBool("updateInBG", value);
|
prefs.setBool("updateInBG", value);
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -388,7 +415,7 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text("Show leaderboard based stats", style: settingsTitlesStyle),
|
title: Text("Show leaderboard based stats", style: Theme.of(context).textTheme.displayLarge),
|
||||||
trailing: Switch(value: showAverages, onChanged: (bool value){
|
trailing: Switch(value: showAverages, onChanged: (bool value){
|
||||||
prefs.setBool("showAverages", value);
|
prefs.setBool("showAverages", value);
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -410,7 +437,7 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text("Show position on leaderboard by stats", style: settingsTitlesStyle),
|
title: Text("Show position on leaderboard by stats", style: Theme.of(context).textTheme.displayLarge),
|
||||||
trailing: Switch(value: showPositions, onChanged: (bool value){
|
trailing: Switch(value: showPositions, onChanged: (bool value){
|
||||||
prefs.setBool("showPositions", value);
|
prefs.setBool("showPositions", value);
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -438,7 +465,7 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
padding: const EdgeInsets.only(bottom: 8.0),
|
padding: const EdgeInsets.only(bottom: 8.0),
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text(SettingsCardMod.customization.title, style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42)),
|
Text(SettingsCardMod.customization.title, style: Theme.of(context).textTheme.titleLarge),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
)),
|
)),
|
||||||
|
@ -448,7 +475,7 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text("Accent color", style: settingsTitlesStyle),
|
title: Text("Accent color", style: Theme.of(context).textTheme.displayLarge),
|
||||||
trailing: ColorIndicator(HSVColor.fromColor(Theme.of(context).colorScheme.primary), width: 25, height: 25),
|
trailing: ColorIndicator(HSVColor.fromColor(Theme.of(context).colorScheme.primary), width: 25, height: 25),
|
||||||
),
|
),
|
||||||
Divider(),
|
Divider(),
|
||||||
|
@ -465,7 +492,7 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
crossAxisAlignment: CrossAxisAlignment.start,
|
crossAxisAlignment: CrossAxisAlignment.start,
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text("Timestamps format", style: settingsTitlesStyle),
|
title: Text("Timestamps format", style: Theme.of(context).textTheme.displayLarge),
|
||||||
trailing: DropdownButton(
|
trailing: DropdownButton(
|
||||||
value: timestampMode,
|
value: timestampMode,
|
||||||
items: <DropdownMenuItem>[
|
items: <DropdownMenuItem>[
|
||||||
|
@ -498,7 +525,7 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text("Sheetbot-like behavior for radar graphs", style: settingsTitlesStyle),
|
title: Text("Sheetbot-like behavior for radar graphs", style: Theme.of(context).textTheme.displayLarge),
|
||||||
trailing: Switch(value: sheetbotRadarGraphs, onChanged: (bool value){
|
trailing: Switch(value: sheetbotRadarGraphs, onChanged: (bool value){
|
||||||
prefs.setBool("sheetbotRadarGraphs", value);
|
prefs.setBool("sheetbotRadarGraphs", value);
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -519,7 +546,7 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
ListTile(
|
ListTile(
|
||||||
title: Text("Osk-Kagari gimmick", style: settingsTitlesStyle),
|
title: Text("Osk-Kagari gimmick", style: Theme.of(context).textTheme.displayLarge),
|
||||||
trailing: Switch(value: oskKagariGimmick, onChanged: (bool value){
|
trailing: Switch(value: oskKagariGimmick, onChanged: (bool value){
|
||||||
prefs.setBool("oskKagariGimmick", value);
|
prefs.setBool("oskKagariGimmick", value);
|
||||||
setState(() {
|
setState(() {
|
||||||
|
@ -545,7 +572,7 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
Card(
|
Card(
|
||||||
child: Center(child: Column(
|
child: Center(child: Column(
|
||||||
children: [
|
children: [
|
||||||
Text(SettingsCardMod.database.title, style: const TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 42)),
|
Text(SettingsCardMod.database.title, style: Theme.of(context).textTheme.titleLarge),
|
||||||
Divider(),
|
Divider(),
|
||||||
FutureBuilder<(int, int, int)>(future: teto.getDatabaseData(),
|
FutureBuilder<(int, int, int)>(future: teto.getDatabaseData(),
|
||||||
builder: (context, snapshot) {
|
builder: (context, snapshot) {
|
||||||
|
@ -602,12 +629,12 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
),
|
),
|
||||||
Card(
|
Card(
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
title: Text("Export Database", style: settingsTitlesStyle),
|
title: Text("Export Database", style: Theme.of(context).textTheme.displayLarge),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Card(
|
Card(
|
||||||
child: ListTile(
|
child: ListTile(
|
||||||
title: Text("Import Database", style: settingsTitlesStyle),
|
title: Text("Import Database", style: Theme.of(context).textTheme.displayLarge),
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
|
@ -628,12 +655,12 @@ class _DestinationSettings extends State<DestinationSettings> {
|
||||||
width: 450,
|
width: 450,
|
||||||
child: Column(
|
child: Column(
|
||||||
children: [
|
children: [
|
||||||
const Card(
|
Card(
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
children: [
|
children: [
|
||||||
Spacer(),
|
Spacer(),
|
||||||
Text("Settings", style: TextStyle(fontFamily: "Eurostile Round Extended", fontSize: 36)),
|
Text("Settings", style: Theme.of(context).textTheme.headlineMedium),
|
||||||
Spacer()
|
Spacer()
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
|
@ -939,7 +966,7 @@ class DistinguishmentThingy extends StatelessWidget{
|
||||||
children: getDistinguishmentTitle(distinguishment.header),
|
children: getDistinguishmentTitle(distinguishment.header),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(getDistinguishmentSubtitle(distinguishment.footer), style: const TextStyle(fontSize: 18), textAlign: TextAlign.center),
|
Text(getDistinguishmentSubtitle(distinguishment.footer), style: Theme.of(context).textTheme.displayLarge, textAlign: TextAlign.center),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -1001,7 +1028,7 @@ class FakeDistinguishmentThingy extends StatelessWidget{
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
Text(getDistinguishmentSubtitle(), style: const TextStyle(fontSize: 18), textAlign: TextAlign.center),
|
Text(getDistinguishmentSubtitle(), style: Theme.of(context).textTheme.displayLarge, textAlign: TextAlign.center),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -1376,10 +1403,13 @@ class _NewUserThingyState extends State<NewUserThingy> with SingleTickerProvider
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
) : Container(
|
) : Container(
|
||||||
transform: Matrix4.translationValues(0, secondButtonPosition, 0),
|
transform: Matrix4.translationValues(secondButtonPosition*5, -secondButtonPosition*25, 0),
|
||||||
child: Opacity(
|
child: Opacity(
|
||||||
opacity: max(0, secondButtonOpacity),
|
opacity: max(0, min(1, secondButtonOpacity)),
|
||||||
child: const Icon(Icons.person_remove)
|
child: Transform.rotate(
|
||||||
|
angle:_addToTrackAnim.status == AnimationStatus.reverse ? (1-_addToTrackAnim.value as double)*-20 : 0,
|
||||||
|
child: const Icon(Icons.person_remove)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
label: _addToTrackAnim.value < 0.5 ? Container(
|
label: _addToTrackAnim.value < 0.5 ? Container(
|
||||||
|
@ -1391,8 +1421,8 @@ class _NewUserThingyState extends State<NewUserThingy> with SingleTickerProvider
|
||||||
) : Container(
|
) : Container(
|
||||||
transform: Matrix4.translationValues(0, secondButtonPosition, 0),
|
transform: Matrix4.translationValues(0, secondButtonPosition, 0),
|
||||||
child: Opacity(
|
child: Opacity(
|
||||||
opacity: max(0, secondButtonOpacity),
|
opacity: max(0, min(1, secondButtonOpacity)),
|
||||||
child: Text("Stop tracking")
|
child: Text(_addToTrackAnimController.isAnimating && _addToTrackAnim.status == AnimationStatus.reverse ? "Done! " : "Stop tracking")
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
style: const ButtonStyle(shape: WidgetStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.only(bottomLeft: Radius.circular(12.0))))));
|
style: const ButtonStyle(shape: WidgetStatePropertyAll(RoundedRectangleBorder(borderRadius: BorderRadius.only(bottomLeft: Radius.circular(12.0))))));
|
||||||
|
|
|
@ -43,15 +43,32 @@ class UserState extends State<UserView> {
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
//final t = Translations.of(context);
|
//final t = Translations.of(context);
|
||||||
return Scaffold(
|
return Scaffold(
|
||||||
appBar: AppBar(
|
|
||||||
title: Text("Search For"),
|
|
||||||
),
|
|
||||||
backgroundColor: Colors.black,
|
backgroundColor: Colors.black,
|
||||||
|
floatingActionButtonLocation: FloatingActionButtonLocation.startTop,
|
||||||
|
floatingActionButton: Padding(
|
||||||
|
padding: const EdgeInsets.all(8.0),
|
||||||
|
child: FloatingActionButton(
|
||||||
|
onPressed: () => Navigator.pop(context),
|
||||||
|
tooltip: 'Fuck go back',
|
||||||
|
child: const Icon(Icons.arrow_back),
|
||||||
|
),
|
||||||
|
),
|
||||||
body: SafeArea(
|
body: SafeArea(
|
||||||
child: LayoutBuilder(
|
child: LayoutBuilder(
|
||||||
builder: (BuildContext context, BoxConstraints constraints) {
|
builder: (BuildContext context, BoxConstraints constraints) {
|
||||||
return DestinationHome(searchFor: widget.searchFor, dataFuture: getData(widget.searchFor), newsFuture: teto.fetchNews(widget.searchFor), constraints: constraints);
|
return Row(
|
||||||
}
|
children: [
|
||||||
|
Card(
|
||||||
|
child: Column(
|
||||||
|
children: [
|
||||||
|
Text("Pornograph", style: TextStyle(),)
|
||||||
|
]
|
||||||
|
),
|
||||||
|
),
|
||||||
|
DestinationHome(searchFor: widget.searchFor, dataFuture: getData(widget.searchFor), newsFuture: teto.fetchNews(widget.searchFor), constraints: constraints),
|
||||||
|
],
|
||||||
|
);
|
||||||
|
}
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
|
@ -41,7 +41,7 @@ class RecentSingleplayerGames extends StatelessWidget{
|
||||||
"5mblast" => get40lTime(record.stats.finalTime.inMicroseconds),
|
"5mblast" => get40lTime(record.stats.finalTime.inMicroseconds),
|
||||||
String() => "huh",
|
String() => "huh",
|
||||||
},
|
},
|
||||||
style: const TextStyle(fontSize: 18)),
|
style: Theme.of(context).textTheme.displayLarge),
|
||||||
subtitle: Text(timestamp(record.timestamp), style: const TextStyle(color: Colors.grey, height: 0.85)),
|
subtitle: Text(timestamp(record.timestamp), style: const TextStyle(color: Colors.grey, height: 0.85)),
|
||||||
trailing: SpTrailingStats(record, record.gamemode)
|
trailing: SpTrailingStats(record, record.gamemode)
|
||||||
)
|
)
|
||||||
|
|
|
@ -141,7 +141,7 @@ class SingleplayerRecord extends StatelessWidget {
|
||||||
"5mblast" => get40lTime(stream!.records[i].stats.finalTime.inMicroseconds),
|
"5mblast" => get40lTime(stream!.records[i].stats.finalTime.inMicroseconds),
|
||||||
String() => "huh",
|
String() => "huh",
|
||||||
},
|
},
|
||||||
style: const TextStyle(fontSize: 18)),
|
style: Theme.of(context).textTheme.displayLarge),
|
||||||
subtitle: Text(timestamp(stream!.records[i].timestamp), style: const TextStyle(color: Colors.grey, height: 0.85)),
|
subtitle: Text(timestamp(stream!.records[i].timestamp), style: const TextStyle(color: Colors.grey, height: 0.85)),
|
||||||
trailing: SpTrailingStats(stream!.records[i], stream!.records[i].gamemode)
|
trailing: SpTrailingStats(stream!.records[i], stream!.records[i].gamemode)
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue