Skip to content

Commit

Permalink
Big refactoring, upated design of nerd stats, info center ideas
Browse files Browse the repository at this point in the history
  • Loading branch information
dan63047 committed Nov 5, 2024
1 parent 647d1f8 commit 6c8e7b9
Show file tree
Hide file tree
Showing 52 changed files with 2,495 additions and 8,942 deletions.
13 changes: 13 additions & 0 deletions lib/data_objects/tetrio_constants.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import 'package:flutter/material.dart';

const int currentSeason = 2;
final DateTime sprintAndBlitzRelevance = DateTime(2024, 8, 25);
const double noTrRd = 60.9;
const double apmWeight = 1;
const double ppsWeight = 45;
Expand All @@ -12,6 +13,18 @@ const double appdspWeight = 140;
const double vsapmWeight = 60;
const double cheeseWeight = 1.25;
const double gbeWeight = 315;

const Map<int, double> xpTableScuffed = { // level: xp required
05000: 67009018.4885772,
10000: 763653437.386,
15000: 2337651144.54149,
20000: 4572735210.50902,
25000: 7376166347.04745,
30000: 10693620096.2168,
40000: 18728882739.482,
50000: 28468683855.2853
};

const List<String> ranks = [
"d",
"d+",
Expand Down
47 changes: 1 addition & 46 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,12 @@ import 'dart:developer' as developer;
import 'package:package_info_plus/package_info_plus.dart';
import 'package:shared_preferences/shared_preferences.dart';
import 'package:tetra_stats/services/tetrio_crud.dart';
import 'package:tetra_stats/views/customization_view.dart';
import 'package:tetra_stats/views/ranks_averages_view.dart';
import 'package:tetra_stats/views/sprint_and_blitz_averages.dart';
import 'package:tetra_stats/views/tl_leaderboard_view.dart';
import 'package:window_manager/window_manager.dart';
import 'package:sqflite_common_ffi/sqflite_ffi.dart';
import 'package:sqflite_common_ffi_web/sqflite_ffi_web.dart';
import 'package:tetra_stats/gen/strings.g.dart';
import 'package:flutter_localizations/flutter_localizations.dart';
import 'package:tetra_stats/views/main_view_tiles.dart';
import 'package:tetra_stats/views/settings_view.dart';
import 'package:tetra_stats/views/tracked_players_view.dart';
import 'package:tetra_stats/views/calc_view.dart';
import 'package:tetra_stats/views/main_view.dart';
import 'package:go_router/go_router.dart';

late final PackageInfo packageInfo;
Expand Down Expand Up @@ -72,44 +65,6 @@ final router = GoRouter(
GoRoute(
path: "/",
builder: (_, __) => const MainView(),
routes: [
GoRoute(
path: 'settings',
builder: (_, __) => const SettingsView(),
routes: [
GoRoute(
path: 'customization',
builder: (_, __) => const CustomizationView(),
),
]
),
GoRoute(
path: "leaderboard",
builder: (_, __) => const TLLeaderboardView(),
routes: [
GoRoute(
path: "LBvalues",
builder: (_, __) => const RankAveragesView(),
),
]
),
GoRoute(
path: "LBvalues",
builder: (_, __) => const RankAveragesView(),
),
GoRoute(
path: 'states',
builder: (_, __) => const TrackedPlayersView(),
),
GoRoute(
path: 'calc',
builder: (_, __) => const CalcView(),
),
GoRoute(
path: 'sprintAndBlitzAverages',
builder: (_, __) => const SprintAndBlitzView(),
)
]
),
GoRoute( // that one intended for Android users, that can open https://ch.tetr.io/u/ links
path: "/u/:userId",
Expand Down
5 changes: 5 additions & 0 deletions lib/utils/copy_to_clipboard.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import 'package:flutter/services.dart';

Future<void> copyToClipboard(String text) async {
await Clipboard.setData(ClipboardData(text: text));
}
1 change: 1 addition & 0 deletions lib/utils/numers_formats.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import 'package:intl/intl.dart';
import 'package:tetra_stats/gen/strings.g.dart';

final NumberFormat compareIntf = NumberFormat("+#,###;-#,###")..maximumFractionDigits = 0;
final NumberFormat fDiff = NumberFormat("+#,###.####;-#,###.####");
final NumberFormat comparef = NumberFormat("+#,###.###;-#,###.###")..maximumFractionDigits = 3;
final NumberFormat comparef2 = NumberFormat("+#,###.##;-#,###.##")..maximumFractionDigits = 2;
final NumberFormat intf = NumberFormat.decimalPatternDigits(locale: LocaleSettings.currentLocale.languageCode, decimalDigits: 0);
Expand Down
146 changes: 0 additions & 146 deletions lib/views/calc_view.dart

This file was deleted.

Loading

0 comments on commit 6c8e7b9

Please sign in to comment.