diff --git a/leaderboard_app/.gitignore b/leaderboard_app/.gitignore
new file mode 100644
index 0000000..3820a95
--- /dev/null
+++ b/leaderboard_app/.gitignore
@@ -0,0 +1,45 @@
+# Miscellaneous
+*.class
+*.log
+*.pyc
+*.swp
+.DS_Store
+.atom/
+.build/
+.buildlog/
+.history
+.svn/
+.swiftpm/
+migrate_working_dir/
+
+# IntelliJ related
+*.iml
+*.ipr
+*.iws
+.idea/
+
+# The .vscode folder contains launch configuration and tasks you configure in
+# VS Code which you may wish to be included in version control, so this line
+# is commented out by default.
+#.vscode/
+
+# Flutter/Dart/Pub related
+**/doc/api/
+**/ios/Flutter/.last_build_id
+.dart_tool/
+.flutter-plugins-dependencies
+.pub-cache/
+.pub/
+/build/
+/coverage/
+
+# Symbolication related
+app.*.symbols
+
+# Obfuscation related
+app.*.map.json
+
+# Android Studio will place build artifacts here
+/android/app/debug
+/android/app/profile
+/android/app/release
diff --git a/leaderboard_app/.metadata b/leaderboard_app/.metadata
new file mode 100644
index 0000000..131e057
--- /dev/null
+++ b/leaderboard_app/.metadata
@@ -0,0 +1,45 @@
+# This file tracks properties of this Flutter project.
+# Used by Flutter tool to assess capabilities and perform upgrades etc.
+#
+# This file should be version controlled and should not be manually edited.
+
+version:
+ revision: "02da4cc00db9eb97fc48e89d319ef48518c2440a"
+ channel: "master"
+
+project_type: app
+
+# Tracks metadata for the flutter migrate command
+migration:
+ platforms:
+ - platform: root
+ create_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+ base_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+ - platform: android
+ create_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+ base_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+ - platform: ios
+ create_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+ base_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+ - platform: linux
+ create_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+ base_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+ - platform: macos
+ create_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+ base_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+ - platform: web
+ create_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+ base_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+ - platform: windows
+ create_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+ base_revision: 02da4cc00db9eb97fc48e89d319ef48518c2440a
+
+ # User provided section
+
+ # List of Local paths (relative to this file) that should be
+ # ignored by the migrate tool.
+ #
+ # Files that are not part of the templates will be ignored by default.
+ unmanaged_files:
+ - 'lib/main.dart'
+ - 'ios/Runner.xcodeproj/project.pbxproj'
diff --git a/leaderboard_app/README.md b/leaderboard_app/README.md
new file mode 100644
index 0000000..2ae7317
--- /dev/null
+++ b/leaderboard_app/README.md
@@ -0,0 +1,170 @@
+# leaderboard_app
+
+Flutter application with backend integration using `dio` + `retrofit` for typed HTTP APIs.
+
+## Backend Integration
+
+We use:
+
+* `dio` for HTTP transport, interceptors, timeouts.
+* `retrofit` for declarative REST interface generation (`lib/services/core/rest_client.dart`).
+* `build_runner` + `retrofit_generator` (and `json_serializable` if/when model code generation is added).
+
+### Generating code
+
+Run code generation after updating API interface annotations:
+
+```bash
+dart run build_runner build --delete-conflicting-outputs
+```
+
+### Using the REST client
+
+```dart
+import 'package:leaderboard_app/services/core/dio_provider.dart';
+import 'package:leaderboard_app/services/core/rest_client.dart';
+
+final dio = await DioProvider.getInstance();
+final api = RestClient(dio);
+
+final start = await api.startVerification({'leetcodeUsername': 'someUser'});
+final status = await api.getVerificationStatus('someUser');
+```
+
+Auth tokens (JWT) are automatically attached from `SharedPreferences` via an interceptor in `DioProvider`.
+
+### Environment / Base URL
+
+Centralized in `lib/config/api_config.dart`.
+
+Default baked-in base URL (when no override is supplied):
+
+```
+http://140.238.213.170:3002/api
+```
+
+Override at build/run time:
+
+```bash
+flutter run --dart-define=API_BASE_URL=https://your.api.host/api
+```
+
+Release / CI example:
+
+```bash
+flutter build apk --dart-define=API_BASE_URL=https://prod.api.host/api
+```
+
+Trailing slashes are trimmed automatically. Keep `/api` if your backend routes are under that prefix.
+
+### Adding new endpoints
+
+1. Edit `lib/services/core/rest_client.dart` – add a method with appropriate HTTP verb annotation.
+2. Run the build command above to regenerate `rest_client.g.dart`.
+3. Consume the new method from services or providers.
+
+### Logging & Retry
+
+`DioProvider` adds a lightweight log interceptor and simple retry (only once) for idempotent GET requests on connection errors.
+
+---
+
+Generated code (`rest_client.g.dart`) should not be manually edited.
+
+
+## Building a Release APK / Sharing the App
+
+1. (Optional) Override the API base URL at build time (recommended for different envs):
+
+```bash
+flutter build apk --release --dart-define=API_BASE_URL=https://prod.api.host/api
+```
+
+If you omit `--dart-define` the baked-in default from `ApiConfig` is used.
+
+2. The unsigned release APK will be at:
+
+```
+build\app\outputs\flutter-apk\app-release.apk
+```
+
+3. (Recommended) Create a keystore and configure signing in `android/key.properties` + `build.gradle` to avoid Play Store rejection and to allow in-place upgrades.
+
+### Example keystore creation (run once)
+
+```bash
+keytool -genkey -v -keystore my-release-key.keystore -alias upload -keyalg RSA -keysize 2048 -validity 10000
+```
+
+Place the keystore under `android/` (never commit to VCS) and add a `key.properties`:
+
+```
+storePassword=YOUR_STORE_PASSWORD
+keyPassword=YOUR_KEY_PASSWORD
+keyAlias=upload
+storeFile=../my-release-key.keystore
+```
+
+Then update `android/app/build.gradle` signingConfigs + buildTypes (if not already present).
+
+### Distributing for quick tests
+
+You can directly share `app-release.apk` with testers (they must enable install from unknown sources). For Play Store publishing prefer an AAB:
+
+```bash
+flutter build appbundle --dart-define=API_BASE_URL=https://prod.api.host/api
+```
+
+## Troubleshooting: "Cannot reach server. Check BASE_URL..."
+
+This message originates from `ErrorUtils.fromDio` when the `DioExceptionType.connectionError` occurs. Common causes:
+
+| Cause | Fix |
+|-------|-----|
+| Device has no internet | Ensure Wi‑Fi/data works (open a website) |
+| Backend URL wrong or down | Open the URL in mobile Chrome to verify response |
+| Using `localhost` / private IP not reachable externally | Use a public/stable host or expose via tunneling (ngrok, Cloudflare) |
+| HTTP blocked (if you switch to HTTPS only) | Ensure correct scheme in `API_BASE_URL` |
+| Missing INTERNET permission | Manifest now includes `` |
+
+To quickly verify the URL the app is using, add a temporary log:
+
+```dart
+print('API base URL: ' + ApiConfig.baseUrl);
+```
+
+Or run with an override:
+
+```bash
+flutter run --release --dart-define=API_BASE_URL=https://your-temp-api/api
+```
+
+If the backend uses a self-signed certificate, Android may reject it—use a valid cert (Let's Encrypt) for production.
+
+## Future Enhancements (Optional)
+
+* Add build flavors: dev / staging / prod with per-flavor `--dart-define` presets.
+* Add environment banner in-app for non-prod.
+* Implement exponential backoff retries for transient network errors.
+* Add Sentry or similar for error monitoring.
+
+## Splash Screen & Offline Handling
+
+The app shows a native splash (configured via `flutter_native_splash`) while core services initialize. For returning users (flag stored in `SharedPreferences` as `returningUser`), dashboard data is preloaded (daily question, submissions if verified, leaderboard) before removing the splash to deliver a populated home view quickly.
+
+If there's no network connectivity at launch, a dedicated offline screen (`NoInternetPage`) is displayed. Connectivity is monitored with `connectivity_plus` through `ConnectivityProvider`; once a connection becomes available the app automatically proceeds with initialization and dismisses the splash.
+
+Update splash assets/colors in `pubspec.yaml` under `flutter_native_splash:` then regenerate:
+
+```bash
+flutter pub run flutter_native_splash:create
+```
+
+Key files:
+
+* `lib/main.dart` – splash preservation & initialization logic (`_AppInitializer`).
+* `lib/provider/connectivity_provider.dart` – connectivity listener.
+* `lib/pages/no_internet_page.dart` – offline UI.
+
+To disable preloading behavior simply remove the `dashboardProvider.loadAll()` call in `_preload()`.
+
diff --git a/leaderboard_app/analysis_options.yaml b/leaderboard_app/analysis_options.yaml
new file mode 100644
index 0000000..f9b3034
--- /dev/null
+++ b/leaderboard_app/analysis_options.yaml
@@ -0,0 +1 @@
+include: package:flutter_lints/flutter.yaml
diff --git a/leaderboard_app/android/.gitignore b/leaderboard_app/android/.gitignore
new file mode 100644
index 0000000..be3943c
--- /dev/null
+++ b/leaderboard_app/android/.gitignore
@@ -0,0 +1,14 @@
+gradle-wrapper.jar
+/.gradle
+/captures/
+/gradlew
+/gradlew.bat
+/local.properties
+GeneratedPluginRegistrant.java
+.cxx/
+
+# Remember to never publicly share your keystore.
+# See https://flutter.dev/to/reference-keystore
+key.properties
+**/*.keystore
+**/*.jks
diff --git a/leaderboard_app/android/app/build.gradle.kts b/leaderboard_app/android/app/build.gradle.kts
new file mode 100644
index 0000000..fa19038
--- /dev/null
+++ b/leaderboard_app/android/app/build.gradle.kts
@@ -0,0 +1,44 @@
+plugins {
+ id("com.android.application")
+ id("kotlin-android")
+ // The Flutter Gradle Plugin must be applied after the Android and Kotlin Gradle plugins.
+ id("dev.flutter.flutter-gradle-plugin")
+}
+
+android {
+ namespace = "com.dscvit.leeterboard"
+ compileSdk = flutter.compileSdkVersion
+ ndkVersion = flutter.ndkVersion
+
+ compileOptions {
+ sourceCompatibility = JavaVersion.VERSION_11
+ targetCompatibility = JavaVersion.VERSION_11
+ }
+
+ kotlinOptions {
+ jvmTarget = JavaVersion.VERSION_11.toString()
+ }
+
+ defaultConfig {
+ // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
+ applicationId = "com.dscvit.leeterboard"
+ // You can update the following values to match your application needs.
+ // For more information, see: https://flutter.dev/to/review-gradle-config.
+ minSdk = flutter.minSdkVersion
+ targetSdk = flutter.targetSdkVersion
+ versionCode = flutter.versionCode
+ versionName = flutter.versionName
+ }
+
+ buildTypes {
+ release {
+ // TODO: Add your own signing config for the release build.
+ // Signing with the debug keys for now, so `flutter run --release` works.
+ signingConfig = signingConfigs.getByName("debug")
+ }
+ }
+}
+
+flutter {
+ source = "../.."
+}
diff --git a/leaderboard_app/android/app/src/debug/AndroidManifest.xml b/leaderboard_app/android/app/src/debug/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/leaderboard_app/android/app/src/debug/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/leaderboard_app/android/app/src/main/AndroidManifest.xml b/leaderboard_app/android/app/src/main/AndroidManifest.xml
new file mode 100644
index 0000000..2f6c491
--- /dev/null
+++ b/leaderboard_app/android/app/src/main/AndroidManifest.xml
@@ -0,0 +1,50 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/leaderboard_app/android/app/src/main/kotlin/com/example/leaderboard_app/MainActivity.kt b/leaderboard_app/android/app/src/main/kotlin/com/example/leaderboard_app/MainActivity.kt
new file mode 100644
index 0000000..b6659cc
--- /dev/null
+++ b/leaderboard_app/android/app/src/main/kotlin/com/example/leaderboard_app/MainActivity.kt
@@ -0,0 +1,5 @@
+package com.dscvit.leeterboard
+
+import io.flutter.embedding.android.FlutterActivity
+
+class MainActivity : FlutterActivity()
diff --git a/leaderboard_app/android/app/src/main/res/drawable-hdpi/android12splash.png b/leaderboard_app/android/app/src/main/res/drawable-hdpi/android12splash.png
new file mode 100644
index 0000000..89ce080
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-hdpi/android12splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png b/leaderboard_app/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..739120d
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-hdpi/splash.png b/leaderboard_app/android/app/src/main/res/drawable-hdpi/splash.png
new file mode 100644
index 0000000..89ce080
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-hdpi/splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-mdpi/android12splash.png b/leaderboard_app/android/app/src/main/res/drawable-mdpi/android12splash.png
new file mode 100644
index 0000000..e958d01
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-mdpi/android12splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png b/leaderboard_app/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..e7a2590
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-mdpi/splash.png b/leaderboard_app/android/app/src/main/res/drawable-mdpi/splash.png
new file mode 100644
index 0000000..e958d01
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-mdpi/splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-night-hdpi/android12splash.png b/leaderboard_app/android/app/src/main/res/drawable-night-hdpi/android12splash.png
new file mode 100644
index 0000000..89ce080
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-night-hdpi/android12splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-night-mdpi/android12splash.png b/leaderboard_app/android/app/src/main/res/drawable-night-mdpi/android12splash.png
new file mode 100644
index 0000000..e958d01
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-night-mdpi/android12splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-night-xhdpi/android12splash.png b/leaderboard_app/android/app/src/main/res/drawable-night-xhdpi/android12splash.png
new file mode 100644
index 0000000..faa50f8
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-night-xhdpi/android12splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png b/leaderboard_app/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png
new file mode 100644
index 0000000..a5e1dee
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-night-xxhdpi/android12splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png b/leaderboard_app/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png
new file mode 100644
index 0000000..d29a8ea
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-night-xxxhdpi/android12splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-v21/background.png b/leaderboard_app/android/app/src/main/res/drawable-v21/background.png
new file mode 100644
index 0000000..e815fd6
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-v21/background.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-v21/launch_background.xml b/leaderboard_app/android/app/src/main/res/drawable-v21/launch_background.xml
new file mode 100644
index 0000000..3cc4948
--- /dev/null
+++ b/leaderboard_app/android/app/src/main/res/drawable-v21/launch_background.xml
@@ -0,0 +1,9 @@
+
+
+ -
+
+
+ -
+
+
+
diff --git a/leaderboard_app/android/app/src/main/res/drawable-xhdpi/android12splash.png b/leaderboard_app/android/app/src/main/res/drawable-xhdpi/android12splash.png
new file mode 100644
index 0000000..faa50f8
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-xhdpi/android12splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png b/leaderboard_app/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..27708dd
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-xhdpi/splash.png b/leaderboard_app/android/app/src/main/res/drawable-xhdpi/splash.png
new file mode 100644
index 0000000..faa50f8
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-xhdpi/splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-xxhdpi/android12splash.png b/leaderboard_app/android/app/src/main/res/drawable-xxhdpi/android12splash.png
new file mode 100644
index 0000000..a5e1dee
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-xxhdpi/android12splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png b/leaderboard_app/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..e774c13
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-xxhdpi/splash.png b/leaderboard_app/android/app/src/main/res/drawable-xxhdpi/splash.png
new file mode 100644
index 0000000..a5e1dee
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-xxhdpi/splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-xxxhdpi/android12splash.png b/leaderboard_app/android/app/src/main/res/drawable-xxxhdpi/android12splash.png
new file mode 100644
index 0000000..d29a8ea
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-xxxhdpi/android12splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png b/leaderboard_app/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png
new file mode 100644
index 0000000..89ce080
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable-xxxhdpi/splash.png b/leaderboard_app/android/app/src/main/res/drawable-xxxhdpi/splash.png
new file mode 100644
index 0000000..d29a8ea
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable-xxxhdpi/splash.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable/background.png b/leaderboard_app/android/app/src/main/res/drawable/background.png
new file mode 100644
index 0000000..e815fd6
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/drawable/background.png differ
diff --git a/leaderboard_app/android/app/src/main/res/drawable/launch_background.xml b/leaderboard_app/android/app/src/main/res/drawable/launch_background.xml
new file mode 100644
index 0000000..3cc4948
--- /dev/null
+++ b/leaderboard_app/android/app/src/main/res/drawable/launch_background.xml
@@ -0,0 +1,9 @@
+
+
+ -
+
+
+ -
+
+
+
diff --git a/leaderboard_app/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml b/leaderboard_app/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
new file mode 100644
index 0000000..5f349f7
--- /dev/null
+++ b/leaderboard_app/android/app/src/main/res/mipmap-anydpi-v26/ic_launcher.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/leaderboard_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png b/leaderboard_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
new file mode 100644
index 0000000..c460d92
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/mipmap-hdpi/ic_launcher.png differ
diff --git a/leaderboard_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png b/leaderboard_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
new file mode 100644
index 0000000..d44ee45
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/mipmap-mdpi/ic_launcher.png differ
diff --git a/leaderboard_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png b/leaderboard_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
new file mode 100644
index 0000000..a810e2e
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png differ
diff --git a/leaderboard_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png b/leaderboard_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
new file mode 100644
index 0000000..250106f
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png differ
diff --git a/leaderboard_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png b/leaderboard_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
new file mode 100644
index 0000000..b39c836
Binary files /dev/null and b/leaderboard_app/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png differ
diff --git a/leaderboard_app/android/app/src/main/res/values-night-v31/styles.xml b/leaderboard_app/android/app/src/main/res/values-night-v31/styles.xml
new file mode 100644
index 0000000..c23369c
--- /dev/null
+++ b/leaderboard_app/android/app/src/main/res/values-night-v31/styles.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
diff --git a/leaderboard_app/android/app/src/main/res/values-night/styles.xml b/leaderboard_app/android/app/src/main/res/values-night/styles.xml
new file mode 100644
index 0000000..3c4a1fe
--- /dev/null
+++ b/leaderboard_app/android/app/src/main/res/values-night/styles.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
diff --git a/leaderboard_app/android/app/src/main/res/values-v31/styles.xml b/leaderboard_app/android/app/src/main/res/values-v31/styles.xml
new file mode 100644
index 0000000..a32dc35
--- /dev/null
+++ b/leaderboard_app/android/app/src/main/res/values-v31/styles.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
diff --git a/leaderboard_app/android/app/src/main/res/values/colors.xml b/leaderboard_app/android/app/src/main/res/values/colors.xml
new file mode 100644
index 0000000..beab31f
--- /dev/null
+++ b/leaderboard_app/android/app/src/main/res/values/colors.xml
@@ -0,0 +1,4 @@
+
+
+ #000000
+
\ No newline at end of file
diff --git a/leaderboard_app/android/app/src/main/res/values/styles.xml b/leaderboard_app/android/app/src/main/res/values/styles.xml
new file mode 100644
index 0000000..847e1be
--- /dev/null
+++ b/leaderboard_app/android/app/src/main/res/values/styles.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
diff --git a/leaderboard_app/android/app/src/main/res/xml/network_security_config.xml b/leaderboard_app/android/app/src/main/res/xml/network_security_config.xml
new file mode 100644
index 0000000..d985794
--- /dev/null
+++ b/leaderboard_app/android/app/src/main/res/xml/network_security_config.xml
@@ -0,0 +1,5 @@
+
+
+
+
+
diff --git a/leaderboard_app/android/app/src/profile/AndroidManifest.xml b/leaderboard_app/android/app/src/profile/AndroidManifest.xml
new file mode 100644
index 0000000..399f698
--- /dev/null
+++ b/leaderboard_app/android/app/src/profile/AndroidManifest.xml
@@ -0,0 +1,7 @@
+
+
+
+
diff --git a/leaderboard_app/android/build.gradle.kts b/leaderboard_app/android/build.gradle.kts
new file mode 100644
index 0000000..dbee657
--- /dev/null
+++ b/leaderboard_app/android/build.gradle.kts
@@ -0,0 +1,24 @@
+allprojects {
+ repositories {
+ google()
+ mavenCentral()
+ }
+}
+
+val newBuildDir: Directory =
+ rootProject.layout.buildDirectory
+ .dir("../../build")
+ .get()
+rootProject.layout.buildDirectory.value(newBuildDir)
+
+subprojects {
+ val newSubprojectBuildDir: Directory = newBuildDir.dir(project.name)
+ project.layout.buildDirectory.value(newSubprojectBuildDir)
+}
+subprojects {
+ project.evaluationDependsOn(":app")
+}
+
+tasks.register("clean") {
+ delete(rootProject.layout.buildDirectory)
+}
diff --git a/leaderboard_app/android/gradle.properties b/leaderboard_app/android/gradle.properties
new file mode 100644
index 0000000..f018a61
--- /dev/null
+++ b/leaderboard_app/android/gradle.properties
@@ -0,0 +1,3 @@
+org.gradle.jvmargs=-Xmx8G -XX:MaxMetaspaceSize=4G -XX:ReservedCodeCacheSize=512m -XX:+HeapDumpOnOutOfMemoryError
+android.useAndroidX=true
+android.enableJetifier=true
diff --git a/leaderboard_app/android/gradle/wrapper/gradle-wrapper.properties b/leaderboard_app/android/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..ac3b479
--- /dev/null
+++ b/leaderboard_app/android/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-all.zip
diff --git a/leaderboard_app/android/settings.gradle.kts b/leaderboard_app/android/settings.gradle.kts
new file mode 100644
index 0000000..fb605bc
--- /dev/null
+++ b/leaderboard_app/android/settings.gradle.kts
@@ -0,0 +1,26 @@
+pluginManagement {
+ val flutterSdkPath =
+ run {
+ val properties = java.util.Properties()
+ file("local.properties").inputStream().use { properties.load(it) }
+ val flutterSdkPath = properties.getProperty("flutter.sdk")
+ require(flutterSdkPath != null) { "flutter.sdk not set in local.properties" }
+ flutterSdkPath
+ }
+
+ includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
+
+ repositories {
+ google()
+ mavenCentral()
+ gradlePluginPortal()
+ }
+}
+
+plugins {
+ id("dev.flutter.flutter-plugin-loader") version "1.0.0"
+ id("com.android.application") version "8.9.1" apply false
+ id("org.jetbrains.kotlin.android") version "2.1.0" apply false
+}
+
+include(":app")
diff --git a/leaderboard_app/assets/icons/LL_Logo.png b/leaderboard_app/assets/icons/LL_Logo.png
new file mode 100644
index 0000000..3ab3f1f
Binary files /dev/null and b/leaderboard_app/assets/icons/LL_Logo.png differ
diff --git a/leaderboard_app/assets/icons/LL_Logo.svg b/leaderboard_app/assets/icons/LL_Logo.svg
new file mode 100644
index 0000000..397b49c
--- /dev/null
+++ b/leaderboard_app/assets/icons/LL_Logo.svg
@@ -0,0 +1,17 @@
+
diff --git a/leaderboard_app/assets/icons/google.png b/leaderboard_app/assets/icons/google.png
new file mode 100644
index 0000000..64b0e95
Binary files /dev/null and b/leaderboard_app/assets/icons/google.png differ
diff --git a/leaderboard_app/devtools_options.yaml b/leaderboard_app/devtools_options.yaml
new file mode 100644
index 0000000..fa0b357
--- /dev/null
+++ b/leaderboard_app/devtools_options.yaml
@@ -0,0 +1,3 @@
+description: This file stores settings for Dart & Flutter DevTools.
+documentation: https://docs.flutter.dev/tools/devtools/extensions#configure-extension-enablement-states
+extensions:
diff --git a/leaderboard_app/fonts/AlumniSans-Italic-VariableFont_wght.ttf b/leaderboard_app/fonts/AlumniSans-Italic-VariableFont_wght.ttf
new file mode 100644
index 0000000..8ee842b
Binary files /dev/null and b/leaderboard_app/fonts/AlumniSans-Italic-VariableFont_wght.ttf differ
diff --git a/leaderboard_app/fonts/AlumniSans-VariableFont_wght.ttf b/leaderboard_app/fonts/AlumniSans-VariableFont_wght.ttf
new file mode 100644
index 0000000..f68b7da
Binary files /dev/null and b/leaderboard_app/fonts/AlumniSans-VariableFont_wght.ttf differ
diff --git a/leaderboard_app/ios/.gitignore b/leaderboard_app/ios/.gitignore
new file mode 100644
index 0000000..7a7f987
--- /dev/null
+++ b/leaderboard_app/ios/.gitignore
@@ -0,0 +1,34 @@
+**/dgph
+*.mode1v3
+*.mode2v3
+*.moved-aside
+*.pbxuser
+*.perspectivev3
+**/*sync/
+.sconsign.dblite
+.tags*
+**/.vagrant/
+**/DerivedData/
+Icon?
+**/Pods/
+**/.symlinks/
+profile
+xcuserdata
+**/.generated/
+Flutter/App.framework
+Flutter/Flutter.framework
+Flutter/Flutter.podspec
+Flutter/Generated.xcconfig
+Flutter/ephemeral/
+Flutter/app.flx
+Flutter/app.zip
+Flutter/flutter_assets/
+Flutter/flutter_export_environment.sh
+ServiceDefinitions.json
+Runner/GeneratedPluginRegistrant.*
+
+# Exceptions to above rules.
+!default.mode1v3
+!default.mode2v3
+!default.pbxuser
+!default.perspectivev3
diff --git a/leaderboard_app/ios/Flutter/AppFrameworkInfo.plist b/leaderboard_app/ios/Flutter/AppFrameworkInfo.plist
new file mode 100644
index 0000000..1dc6cf7
--- /dev/null
+++ b/leaderboard_app/ios/Flutter/AppFrameworkInfo.plist
@@ -0,0 +1,26 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ en
+ CFBundleExecutable
+ App
+ CFBundleIdentifier
+ io.flutter.flutter.app
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ App
+ CFBundlePackageType
+ FMWK
+ CFBundleShortVersionString
+ 1.0
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ 1.0
+ MinimumOSVersion
+ 13.0
+
+
diff --git a/leaderboard_app/ios/Flutter/Debug.xcconfig b/leaderboard_app/ios/Flutter/Debug.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/leaderboard_app/ios/Flutter/Debug.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/leaderboard_app/ios/Flutter/Release.xcconfig b/leaderboard_app/ios/Flutter/Release.xcconfig
new file mode 100644
index 0000000..592ceee
--- /dev/null
+++ b/leaderboard_app/ios/Flutter/Release.xcconfig
@@ -0,0 +1 @@
+#include "Generated.xcconfig"
diff --git a/leaderboard_app/ios/Runner.xcodeproj/project.pbxproj b/leaderboard_app/ios/Runner.xcodeproj/project.pbxproj
new file mode 100644
index 0000000..7861f5d
--- /dev/null
+++ b/leaderboard_app/ios/Runner.xcodeproj/project.pbxproj
@@ -0,0 +1,616 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 54;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 331C807B294A618700263BE5 /* RunnerTests.swift */; };
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 331C8085294A63A400263BE5 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 97C146E61CF9000F007C117D /* Project object */;
+ proxyType = 1;
+ remoteGlobalIDString = 97C146ED1CF9000F007C117D;
+ remoteInfo = Runner;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 9705A1C41CF9048500538489 /* Embed Frameworks */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ );
+ name = "Embed Frameworks";
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = ""; };
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = ""; };
+ 331C807B294A618700263BE5 /* RunnerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RunnerTests.swift; sourceTree = ""; };
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = RunnerTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = ""; };
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = ""; };
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = ""; };
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = ""; };
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = ""; };
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = ""; };
+ 97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ 97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = ""; };
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = ""; };
+ 97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = ""; };
+ 97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 97C146EB1CF9000F007C117D /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 331C8082294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXGroup;
+ children = (
+ 331C807B294A618700263BE5 /* RunnerTests.swift */,
+ );
+ path = RunnerTests;
+ sourceTree = "";
+ };
+ 9740EEB11CF90186004384FC /* Flutter */ = {
+ isa = PBXGroup;
+ children = (
+ 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
+ 9740EEB21CF90195004384FC /* Debug.xcconfig */,
+ 7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
+ 9740EEB31CF90195004384FC /* Generated.xcconfig */,
+ );
+ name = Flutter;
+ sourceTree = "";
+ };
+ 97C146E51CF9000F007C117D = {
+ isa = PBXGroup;
+ children = (
+ 9740EEB11CF90186004384FC /* Flutter */,
+ 97C146F01CF9000F007C117D /* Runner */,
+ 97C146EF1CF9000F007C117D /* Products */,
+ 331C8082294A63A400263BE5 /* RunnerTests */,
+ );
+ sourceTree = "";
+ };
+ 97C146EF1CF9000F007C117D /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146EE1CF9000F007C117D /* Runner.app */,
+ 331C8081294A63A400263BE5 /* RunnerTests.xctest */,
+ );
+ name = Products;
+ sourceTree = "";
+ };
+ 97C146F01CF9000F007C117D /* Runner */ = {
+ isa = PBXGroup;
+ children = (
+ 97C146FA1CF9000F007C117D /* Main.storyboard */,
+ 97C146FD1CF9000F007C117D /* Assets.xcassets */,
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
+ 97C147021CF9000F007C117D /* Info.plist */,
+ 1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
+ 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
+ 74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
+ 74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
+ );
+ path = Runner;
+ sourceTree = "";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 331C8080294A63A400263BE5 /* RunnerTests */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */;
+ buildPhases = (
+ 331C807D294A63A400263BE5 /* Sources */,
+ 331C807F294A63A400263BE5 /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */,
+ );
+ name = RunnerTests;
+ productName = RunnerTests;
+ productReference = 331C8081294A63A400263BE5 /* RunnerTests.xctest */;
+ productType = "com.apple.product-type.bundle.unit-test";
+ };
+ 97C146ED1CF9000F007C117D /* Runner */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
+ buildPhases = (
+ 9740EEB61CF901F6004384FC /* Run Script */,
+ 97C146EA1CF9000F007C117D /* Sources */,
+ 97C146EB1CF9000F007C117D /* Frameworks */,
+ 97C146EC1CF9000F007C117D /* Resources */,
+ 9705A1C41CF9048500538489 /* Embed Frameworks */,
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Runner;
+ productName = Runner;
+ productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 97C146E61CF9000F007C117D /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ BuildIndependentTargetsInParallel = YES;
+ LastUpgradeCheck = 1510;
+ ORGANIZATIONNAME = "";
+ TargetAttributes = {
+ 331C8080294A63A400263BE5 = {
+ CreatedOnToolsVersion = 14.0;
+ TestTargetID = 97C146ED1CF9000F007C117D;
+ };
+ 97C146ED1CF9000F007C117D = {
+ CreatedOnToolsVersion = 7.3.1;
+ LastSwiftMigration = 1100;
+ };
+ };
+ };
+ buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
+ compatibilityVersion = "Xcode 9.3";
+ developmentRegion = en;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ Base,
+ );
+ mainGroup = 97C146E51CF9000F007C117D;
+ productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 97C146ED1CF9000F007C117D /* Runner */,
+ 331C8080294A63A400263BE5 /* RunnerTests */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 331C807F294A63A400263BE5 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 97C146EC1CF9000F007C117D /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
+ 3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
+ 97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
+ 97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXShellScriptBuildPhase section */
+ 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}",
+ );
+ name = "Thin Binary";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" embed_and_thin";
+ };
+ 9740EEB61CF901F6004384FC /* Run Script */ = {
+ isa = PBXShellScriptBuildPhase;
+ alwaysOutOfDate = 1;
+ buildActionMask = 2147483647;
+ files = (
+ );
+ inputPaths = (
+ );
+ name = "Run Script";
+ outputPaths = (
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ shellPath = /bin/sh;
+ shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
+ };
+/* End PBXShellScriptBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 331C807D294A63A400263BE5 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 331C808B294A63AB00263BE5 /* RunnerTests.swift in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+ 97C146EA1CF9000F007C117D /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
+ 1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 331C8086294A63A400263BE5 /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ target = 97C146ED1CF9000F007C117D /* Runner */;
+ targetProxy = 331C8085294A63A400263BE5 /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 97C146FA1CF9000F007C117D /* Main.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C146FB1CF9000F007C117D /* Base */,
+ );
+ name = Main.storyboard;
+ sourceTree = "";
+ };
+ 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 97C147001CF9000F007C117D /* Base */,
+ );
+ name = LaunchScreen.storyboard;
+ sourceTree = "";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 249021D3217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Profile;
+ };
+ 249021D4217E4FDB00AE95B9 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.leaderboardApp;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Profile;
+ };
+ 331C8088294A63A400263BE5 /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.leaderboardApp.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG;
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Debug;
+ };
+ 331C8089294A63A400263BE5 /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.leaderboardApp.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Release;
+ };
+ 331C808A294A63A400263BE5 /* Profile */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ BUNDLE_LOADER = "$(TEST_HOST)";
+ CODE_SIGN_STYLE = Automatic;
+ CURRENT_PROJECT_VERSION = 1;
+ GENERATE_INFOPLIST_FILE = YES;
+ MARKETING_VERSION = 1.0;
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.leaderboardApp.RunnerTests;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_VERSION = 5.0;
+ TEST_HOST = "$(BUILT_PRODUCTS_DIR)/Runner.app/$(BUNDLE_EXECUTABLE_FOLDER_PATH)/Runner";
+ };
+ name = Profile;
+ };
+ 97C147031CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = dwarf;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_TESTABILITY = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ MTL_ENABLE_DEBUG_INFO = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = iphoneos;
+ TARGETED_DEVICE_FAMILY = "1,2";
+ };
+ name = Debug;
+ };
+ 97C147041CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = AppIcon;
+ CLANG_ANALYZER_NONNULL = YES;
+ CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+ CLANG_CXX_LIBRARY = "libc++";
+ CLANG_ENABLE_MODULES = YES;
+ CLANG_ENABLE_OBJC_ARC = YES;
+ CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
+ CLANG_WARN_BOOL_CONVERSION = YES;
+ CLANG_WARN_COMMA = YES;
+ CLANG_WARN_CONSTANT_CONVERSION = YES;
+ CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
+ CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+ CLANG_WARN_EMPTY_BODY = YES;
+ CLANG_WARN_ENUM_CONVERSION = YES;
+ CLANG_WARN_INFINITE_RECURSION = YES;
+ CLANG_WARN_INT_CONVERSION = YES;
+ CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
+ CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
+ CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
+ CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+ CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
+ CLANG_WARN_STRICT_PROTOTYPES = YES;
+ CLANG_WARN_SUSPICIOUS_MOVE = YES;
+ CLANG_WARN_UNREACHABLE_CODE = YES;
+ CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+ "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+ COPY_PHASE_STRIP = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ ENABLE_NS_ASSERTIONS = NO;
+ ENABLE_STRICT_OBJC_MSGSEND = YES;
+ ENABLE_USER_SCRIPT_SANDBOXING = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_NO_COMMON_BLOCKS = YES;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+ GCC_WARN_UNDECLARED_SELECTOR = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
+ GCC_WARN_UNUSED_FUNCTION = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ IPHONEOS_DEPLOYMENT_TARGET = 13.0;
+ MTL_ENABLE_DEBUG_INFO = NO;
+ SDKROOT = iphoneos;
+ SUPPORTED_PLATFORMS = iphoneos;
+ SWIFT_COMPILATION_MODE = wholemodule;
+ SWIFT_OPTIMIZATION_LEVEL = "-O";
+ TARGETED_DEVICE_FAMILY = "1,2";
+ VALIDATE_PRODUCT = YES;
+ };
+ name = Release;
+ };
+ 97C147061CF9000F007C117D /* Debug */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.leaderboardApp;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_OPTIMIZATION_LEVEL = "-Onone";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Debug;
+ };
+ 97C147071CF9000F007C117D /* Release */ = {
+ isa = XCBuildConfiguration;
+ baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
+ buildSettings = {
+ ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+ CLANG_ENABLE_MODULES = YES;
+ CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
+ ENABLE_BITCODE = NO;
+ INFOPLIST_FILE = Runner/Info.plist;
+ LD_RUNPATH_SEARCH_PATHS = (
+ "$(inherited)",
+ "@executable_path/Frameworks",
+ );
+ PRODUCT_BUNDLE_IDENTIFIER = com.example.leaderboardApp;
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
+ SWIFT_VERSION = 5.0;
+ VERSIONING_SYSTEM = "apple-generic";
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 331C8087294A63A400263BE5 /* Build configuration list for PBXNativeTarget "RunnerTests" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 331C8088294A63A400263BE5 /* Debug */,
+ 331C8089294A63A400263BE5 /* Release */,
+ 331C808A294A63A400263BE5 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147031CF9000F007C117D /* Debug */,
+ 97C147041CF9000F007C117D /* Release */,
+ 249021D3217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 97C147061CF9000F007C117D /* Debug */,
+ 97C147071CF9000F007C117D /* Release */,
+ 249021D4217E4FDB00AE95B9 /* Profile */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 97C146E61CF9000F007C117D /* Project object */;
+}
diff --git a/leaderboard_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/leaderboard_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..919434a
--- /dev/null
+++ b/leaderboard_app/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/leaderboard_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/leaderboard_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/leaderboard_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/leaderboard_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/leaderboard_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/leaderboard_app/ios/Runner.xcodeproj/project.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/leaderboard_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/leaderboard_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
new file mode 100644
index 0000000..e3773d4
--- /dev/null
+++ b/leaderboard_app/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme
@@ -0,0 +1,101 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/leaderboard_app/ios/Runner.xcworkspace/contents.xcworkspacedata b/leaderboard_app/ios/Runner.xcworkspace/contents.xcworkspacedata
new file mode 100644
index 0000000..1d526a1
--- /dev/null
+++ b/leaderboard_app/ios/Runner.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+
+
+
+
+
diff --git a/leaderboard_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/leaderboard_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
new file mode 100644
index 0000000..18d9810
--- /dev/null
+++ b/leaderboard_app/ios/Runner.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist
@@ -0,0 +1,8 @@
+
+
+
+
+ IDEDidComputeMac32BitWarning
+
+
+
diff --git a/leaderboard_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings b/leaderboard_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
new file mode 100644
index 0000000..f9b0d7c
--- /dev/null
+++ b/leaderboard_app/ios/Runner.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -0,0 +1,8 @@
+
+
+
+
+ PreviewsEnabled
+
+
+
diff --git a/leaderboard_app/ios/Runner/AppDelegate.swift b/leaderboard_app/ios/Runner/AppDelegate.swift
new file mode 100644
index 0000000..6266644
--- /dev/null
+++ b/leaderboard_app/ios/Runner/AppDelegate.swift
@@ -0,0 +1,13 @@
+import Flutter
+import UIKit
+
+@main
+@objc class AppDelegate: FlutterAppDelegate {
+ override func application(
+ _ application: UIApplication,
+ didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
+ ) -> Bool {
+ GeneratedPluginRegistrant.register(with: self)
+ return super.application(application, didFinishLaunchingWithOptions: launchOptions)
+ }
+}
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
new file mode 100644
index 0000000..d36b1fa
--- /dev/null
+++ b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
@@ -0,0 +1,122 @@
+{
+ "images" : [
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-20x20@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-29x29@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-40x40@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "60x60",
+ "idiom" : "iphone",
+ "filename" : "Icon-App-60x60@3x.png",
+ "scale" : "3x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "20x20",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-20x20@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "29x29",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-29x29@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "40x40",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-40x40@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@1x.png",
+ "scale" : "1x"
+ },
+ {
+ "size" : "76x76",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-76x76@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "83.5x83.5",
+ "idiom" : "ipad",
+ "filename" : "Icon-App-83.5x83.5@2x.png",
+ "scale" : "2x"
+ },
+ {
+ "size" : "1024x1024",
+ "idiom" : "ios-marketing",
+ "filename" : "Icon-App-1024x1024@1x.png",
+ "scale" : "1x"
+ }
+ ],
+ "info" : {
+ "version" : 1,
+ "author" : "xcode"
+ }
+}
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
new file mode 100644
index 0000000..33cc734
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
new file mode 100644
index 0000000..b8d9cb8
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
new file mode 100644
index 0000000..56f3844
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
new file mode 100644
index 0000000..069f74b
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
new file mode 100644
index 0000000..029b47f
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
new file mode 100644
index 0000000..5cd5764
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
new file mode 100644
index 0000000..d72c0c1
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
new file mode 100644
index 0000000..56f3844
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
new file mode 100644
index 0000000..a0de470
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
new file mode 100644
index 0000000..e6357d0
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png
new file mode 100644
index 0000000..c22d7c9
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@1x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png
new file mode 100644
index 0000000..945f28b
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-50x50@2x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png
new file mode 100644
index 0000000..7b6b3ae
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@1x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png
new file mode 100644
index 0000000..21ea12b
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-57x57@2x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
new file mode 100644
index 0000000..e6357d0
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
new file mode 100644
index 0000000..4c39751
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png
new file mode 100644
index 0000000..c460d92
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@1x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png
new file mode 100644
index 0000000..250106f
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-72x72@2x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
new file mode 100644
index 0000000..0eb4751
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
new file mode 100644
index 0000000..0a08685
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
new file mode 100644
index 0000000..f42e99b
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json
new file mode 100644
index 0000000..9f447e1
--- /dev/null
+++ b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchBackground.imageset/Contents.json
@@ -0,0 +1,21 @@
+{
+ "images" : [
+ {
+ "filename" : "background.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png
new file mode 100644
index 0000000..e815fd6
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchBackground.imageset/background.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
new file mode 100644
index 0000000..00cabce
--- /dev/null
+++ b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json
@@ -0,0 +1,23 @@
+{
+ "images" : [
+ {
+ "filename" : "LaunchImage.png",
+ "idiom" : "universal",
+ "scale" : "1x"
+ },
+ {
+ "filename" : "LaunchImage@2x.png",
+ "idiom" : "universal",
+ "scale" : "2x"
+ },
+ {
+ "filename" : "LaunchImage@3x.png",
+ "idiom" : "universal",
+ "scale" : "3x"
+ }
+ ],
+ "info" : {
+ "author" : "xcode",
+ "version" : 1
+ }
+}
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
new file mode 100644
index 0000000..e958d01
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
new file mode 100644
index 0000000..faa50f8
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
new file mode 100644
index 0000000..a5e1dee
Binary files /dev/null and b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png differ
diff --git a/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
new file mode 100644
index 0000000..89c2725
--- /dev/null
+++ b/leaderboard_app/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md
@@ -0,0 +1,5 @@
+# Launch Screen Assets
+
+You can customize the launch screen with your own desired assets by replacing the image files in this directory.
+
+You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
\ No newline at end of file
diff --git a/leaderboard_app/ios/Runner/Base.lproj/LaunchScreen.storyboard b/leaderboard_app/ios/Runner/Base.lproj/LaunchScreen.storyboard
new file mode 100644
index 0000000..5a37630
--- /dev/null
+++ b/leaderboard_app/ios/Runner/Base.lproj/LaunchScreen.storyboard
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/leaderboard_app/ios/Runner/Base.lproj/Main.storyboard b/leaderboard_app/ios/Runner/Base.lproj/Main.storyboard
new file mode 100644
index 0000000..f3c2851
--- /dev/null
+++ b/leaderboard_app/ios/Runner/Base.lproj/Main.storyboard
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/leaderboard_app/ios/Runner/Info.plist b/leaderboard_app/ios/Runner/Info.plist
new file mode 100644
index 0000000..849c51a
--- /dev/null
+++ b/leaderboard_app/ios/Runner/Info.plist
@@ -0,0 +1,69 @@
+
+
+
+
+ CFBundleDevelopmentRegion
+ $(DEVELOPMENT_LANGUAGE)
+ CFBundleDisplayName
+ Leaderboard App
+ CFBundleExecutable
+ $(EXECUTABLE_NAME)
+ CFBundleIdentifier
+ $(PRODUCT_BUNDLE_IDENTIFIER)
+ CFBundleInfoDictionaryVersion
+ 6.0
+ CFBundleName
+ leaderboard_app
+ CFBundlePackageType
+ APPL
+ CFBundleShortVersionString
+ $(FLUTTER_BUILD_NAME)
+ CFBundleSignature
+ ????
+ CFBundleVersion
+ $(FLUTTER_BUILD_NUMBER)
+ LSRequiresIPhoneOS
+
+ UILaunchStoryboardName
+ LaunchScreen
+ UIMainStoryboardFile
+ Main
+ UISupportedInterfaceOrientations
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ UISupportedInterfaceOrientations~ipad
+
+ UIInterfaceOrientationPortrait
+ UIInterfaceOrientationPortraitUpsideDown
+ UIInterfaceOrientationLandscapeLeft
+ UIInterfaceOrientationLandscapeRight
+
+ CADisableMinimumFrameDurationOnPhone
+
+ UIApplicationSupportsIndirectInputEvents
+
+
+ NSAppTransportSecurity
+
+ NSAllowsArbitraryLoads
+
+ NSExceptionDomains
+
+ localhost
+
+ NSExceptionAllowsInsecureHTTPLoads
+
+ NSIncludesSubdomains
+
+
+
+
+ UIStatusBarHidden
+
+ UIViewControllerBasedStatusBarAppearance
+
+
+
diff --git a/leaderboard_app/ios/Runner/Runner-Bridging-Header.h b/leaderboard_app/ios/Runner/Runner-Bridging-Header.h
new file mode 100644
index 0000000..308a2a5
--- /dev/null
+++ b/leaderboard_app/ios/Runner/Runner-Bridging-Header.h
@@ -0,0 +1 @@
+#import "GeneratedPluginRegistrant.h"
diff --git a/leaderboard_app/ios/RunnerTests/RunnerTests.swift b/leaderboard_app/ios/RunnerTests/RunnerTests.swift
new file mode 100644
index 0000000..86a7c3b
--- /dev/null
+++ b/leaderboard_app/ios/RunnerTests/RunnerTests.swift
@@ -0,0 +1,12 @@
+import Flutter
+import UIKit
+import XCTest
+
+class RunnerTests: XCTestCase {
+
+ func testExample() {
+ // If you add code to the Runner application, consider adding tests here.
+ // See https://developer.apple.com/documentation/xctest for more information about using XCTest.
+ }
+
+}
diff --git a/leaderboard_app/lib/chatpage-components/chat_view.dart b/leaderboard_app/lib/chatpage-components/chat_view.dart
new file mode 100644
index 0000000..8854775
--- /dev/null
+++ b/leaderboard_app/lib/chatpage-components/chat_view.dart
@@ -0,0 +1,155 @@
+import 'package:flutter/material.dart';
+import 'package:leaderboard_app/pages/groupinfo_page.dart';
+import 'package:provider/provider.dart';
+import '../provider/chat_provider.dart';
+import 'message_list.dart';
+import 'user_input.dart';
+
+class ChatView extends StatefulWidget {
+ final String groupId;
+ final String groupName;
+
+ const ChatView({super.key, required this.groupId, required this.groupName});
+
+ @override
+ State createState() => _ChatViewState();
+}
+
+class _ChatViewState extends State {
+ final TextEditingController _messageController = TextEditingController();
+ final ScrollController _scrollController = ScrollController();
+ final FocusNode myFocusNode = FocusNode();
+ bool _didInitialAutoScroll = false; // guard to only auto-scroll once after history loads
+
+ @override
+ void initState() {
+ super.initState();
+ myFocusNode.addListener(() {
+ if (myFocusNode.hasFocus) {
+ Future.delayed(const Duration(milliseconds: 300), scrollDown);
+ }
+ });
+ Future.delayed(const Duration(milliseconds: 500), scrollDown);
+ // Hook into provider after first frame to attach incoming message callback
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ if (!mounted) return;
+ final chat = context.read();
+ chat.onIncomingMessage = (gid) {
+ if (gid == widget.groupId) {
+ WidgetsBinding.instance.addPostFrameCallback((_) => scrollDown());
+ }
+ };
+ });
+ }
+
+ void scrollDown() {
+ if (_scrollController.hasClients) {
+ _scrollController.animateTo(
+ _scrollController.position.maxScrollExtent + 80,
+ duration: const Duration(milliseconds: 300),
+ curve: Curves.easeOut,
+ );
+ }
+ }
+
+ @override
+ void dispose() {
+ try {
+ final chat = context.read();
+ if (chat.onIncomingMessage != null) chat.onIncomingMessage = null;
+ } catch (_) {}
+ _messageController.dispose();
+ _scrollController.dispose();
+ myFocusNode.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final theme = Theme.of(context).colorScheme;
+ final chat = Provider.of(context); // watch
+ // Attempt initial auto-scroll when messages first arrive
+ if (!_didInitialAutoScroll) {
+ final msgs = chat.getMessages(widget.groupId);
+ if (msgs.isNotEmpty) {
+ // schedule after current frame so ListView has dimensions
+ WidgetsBinding.instance.addPostFrameCallback((_) => scrollDown());
+ _didInitialAutoScroll = true;
+ }
+ }
+
+ return GestureDetector(
+ onTap: () => FocusScope.of(context).unfocus(),
+ child: Scaffold(
+ backgroundColor: theme.surface,
+ appBar: AppBar(
+ backgroundColor: Colors.transparent,
+ elevation: 0,
+ leading: const BackButton(),
+ titleSpacing: 0,
+ title: GestureDetector(
+ onTap: () {
+ Navigator.push(
+ context,
+ MaterialPageRoute(
+ builder: (_) => GroupInfoPage(groupId: widget.groupId, initialName: widget.groupName),
+ ),
+ ).then((result) {
+ if (result is Map && (result['leftGroup'] == true || result['deletedGroup'] == true)) {
+ if (mounted) Navigator.of(context).pop(result);
+ }
+ });
+ },
+ child: Row(
+ children: [
+ const CircleAvatar(
+ radius: 20,
+ backgroundColor: Colors.grey,
+ child: Icon(Icons.group, color: Colors.white),
+ ),
+ const SizedBox(width: 12),
+ Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(children: [
+ Text(
+ widget.groupName,
+ style: TextStyle(
+ color: theme.primary,
+ fontWeight: FontWeight.bold,
+ fontSize: 16,
+ ),
+ ),
+ const SizedBox(width: 8),
+ if (chat.isConnecting)
+ const SizedBox(width: 14, height: 14, child: CircularProgressIndicator(strokeWidth: 2)),
+ if (!chat.isConnecting && !chat.isConnected)
+ const Icon(Icons.cloud_off, color: Colors.red, size: 16),
+ ]),
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ body: Column(
+ children: [
+ Expanded(
+ child: MessageList(
+ groupId: widget.groupId,
+ scrollController: _scrollController,
+ scrollDownCallback: scrollDown,
+ ),
+ ),
+ UserInput(
+ groupId: widget.groupId,
+ messageController: _messageController,
+ focusNode: myFocusNode,
+ scrollDownCallback: scrollDown,
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
diff --git a/leaderboard_app/lib/chatpage-components/message_list.dart b/leaderboard_app/lib/chatpage-components/message_list.dart
new file mode 100644
index 0000000..55d0f2f
--- /dev/null
+++ b/leaderboard_app/lib/chatpage-components/message_list.dart
@@ -0,0 +1,301 @@
+import 'package:flutter/material.dart';
+import 'package:pixelarticons/pixel.dart';
+import 'package:provider/provider.dart';
+import 'package:chat_bubbles/chat_bubbles.dart';
+import '../provider/chat_provider.dart';
+
+/// MessageList features:
+/// 1. Bubble tails only on the last message in a consecutive block from the same sender.
+/// 2. Only other users' names are shown (current user's name omitted) above the first bubble in their consecutive block.
+/// 3. Swipe left on any message to reveal timestamps for all messages; swipe right to hide.
+class MessageList extends StatefulWidget {
+ final String groupId;
+ final ScrollController scrollController;
+ final VoidCallback scrollDownCallback;
+
+ const MessageList({
+ super.key,
+ required this.groupId,
+ required this.scrollController,
+ required this.scrollDownCallback,
+ });
+
+ @override
+ State createState() => _MessageListState();
+}
+
+class _MessageListState extends State {
+ /// Global toggle: when true show timestamp for all messages.
+ bool _showAllTimes = false;
+
+ void _setShowAllTimes(bool value) {
+ if (_showAllTimes == value) return;
+ setState(() => _showAllTimes = value);
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final provider = Provider.of(context);
+ final messages = provider.getMessages(widget.groupId);
+
+ if (messages.isEmpty) {
+ return Center(
+ child: Text(
+ "No messages yet",
+ style: TextStyle(color: Theme.of(context).colorScheme.primary),
+ ),
+ );
+ }
+
+ return ListView.builder(
+ controller: widget.scrollController,
+ itemCount: messages.length,
+ itemBuilder: (context, index) {
+ final msg = messages[index];
+ final isMe = msg["isMe"] == true;
+ final isSystem = msg["senderID"] == "system";
+ final isImage = msg["type"] == "image";
+
+ if (isSystem) return _SystemMessage(msg: msg);
+ if (isImage) return _ImageMessage(msg: msg, isMe: isMe);
+
+ // Determine tail: only last in consecutive block by same sender.
+ final currentSender = msg["senderID"];
+ bool hasTail = true;
+ if (index < messages.length - 1) {
+ final next = messages[index + 1];
+ if (next["senderID"] == currentSender) {
+ hasTail = false;
+ }
+ }
+
+ final prevSender = index > 0 ? messages[index - 1]["senderID"] : null;
+ final showName = prevSender != msg["senderID"]; // only first in block
+
+ return _TextMessage(
+ msg: msg,
+ isMe: isMe,
+ tail: hasTail,
+ showTime: _showAllTimes,
+ showName: showName,
+ onSwipeLeft: () => _setShowAllTimes(true),
+ onSwipeRight: () => _setShowAllTimes(false),
+ );
+ },
+ );
+ }
+}
+
+class _SystemMessage extends StatelessWidget {
+ final Map msg;
+ const _SystemMessage({required this.msg});
+
+ @override
+ Widget build(BuildContext context) {
+ return Center(
+ child: Container(
+ margin: const EdgeInsets.symmetric(vertical: 6),
+ padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
+ decoration: BoxDecoration(
+ color: Colors.grey.shade800,
+ borderRadius: BorderRadius.circular(8),
+ ),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ Icon(msg["icon"] ?? Icons.info, size: 18, color: Colors.white),
+ const SizedBox(width: 6),
+ Text(
+ msg["message"] ?? "",
+ style: const TextStyle(color: Colors.white, fontSize: 14),
+ ),
+ const SizedBox(width: 6),
+ Text(
+ msg["timestamp"] ?? "",
+ style: const TextStyle(color: Colors.white54, fontSize: 12),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+class _ImageMessage extends StatelessWidget {
+ final Map msg;
+ final bool isMe;
+ const _ImageMessage({required this.msg, required this.isMe});
+
+ @override
+ Widget build(BuildContext context) {
+ final bubbleColor = isMe ? const Color(0xFFE3C17D) : Colors.grey.shade900;
+ return Align(
+ alignment: isMe ? Alignment.centerRight : Alignment.centerLeft,
+ child: Container(
+ margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 4),
+ padding: const EdgeInsets.all(12),
+ decoration: BoxDecoration(
+ color: bubbleColor,
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: Column(
+ crossAxisAlignment: isMe ? CrossAxisAlignment.end : CrossAxisAlignment.start,
+ children: [
+ Container(
+ width: 180,
+ height: 180,
+ decoration: BoxDecoration(
+ color: Colors.grey.shade300,
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: const Center(
+ child: Icon(Pixel.image, size: 66, color: Colors.grey),
+ ),
+ ),
+ const SizedBox(height: 4),
+ Text(
+ msg["timestamp"] ?? "",
+ style: TextStyle(fontSize: 12, color: isMe ? Colors.black54 : Colors.white54),
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
+
+class _TextMessage extends StatefulWidget {
+ final Map msg;
+ final bool isMe;
+ final bool tail;
+ final bool showTime; // global toggle
+ final bool showName;
+ final VoidCallback onSwipeLeft; // show all times
+ final VoidCallback onSwipeRight; // hide all times
+
+ const _TextMessage({
+ required this.msg,
+ required this.isMe,
+ required this.tail,
+ required this.showTime,
+ required this.showName,
+ required this.onSwipeLeft,
+ required this.onSwipeRight,
+ });
+
+ @override
+ State<_TextMessage> createState() => _TextMessageState();
+}
+
+class _TextMessageState extends State<_TextMessage> {
+ double _dragX = 0; // negative when swiping left
+
+ static const double _revealThreshold = -30; // pixels
+ static const double _hideThreshold = 30; // for right swipe (unused mostly)
+ static const double _minDrag = -90; // allow slight off-screen travel
+ static const double _maxDrag = 40;
+
+ void _onDragUpdate(DragUpdateDetails d) {
+ setState(() {
+ _dragX += d.delta.dx;
+ if (_dragX < _minDrag) _dragX = _minDrag;
+ if (_dragX > _maxDrag) _dragX = _maxDrag;
+ });
+ }
+
+ void _onDragEnd(DragEndDetails d) {
+ final velocity = d.primaryVelocity ?? 0;
+ if (_dragX <= _revealThreshold || velocity < -600) {
+ widget.onSwipeLeft();
+ } else if (_dragX >= _hideThreshold || velocity > 600) {
+ widget.onSwipeRight();
+ }
+ // snap back
+ setState(() => _dragX = 0);
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final isMe = widget.isMe;
+ final bubbleColor = isMe ? const Color(0xFFE3C17D) : Colors.grey.shade900;
+ final textColor = isMe ? Colors.black : Colors.white;
+ // Username color for other users set to grey500 as requested
+ final nameColor = isMe ? Colors.black : Colors.grey.shade500;
+
+ // Base offset when timestamps visible (shift left a bit to emphasize reveal)
+ final baseShift = widget.showTime ? -12.0 : 0.0;
+ final effectiveShift = baseShift + _dragX; // _dragX usually 0 except during gesture
+
+ return GestureDetector(
+ onHorizontalDragUpdate: _onDragUpdate,
+ onHorizontalDragEnd: _onDragEnd,
+ child: Align(
+ alignment: isMe ? Alignment.centerRight : Alignment.centerLeft,
+ child: Container(
+ margin: const EdgeInsets.symmetric(horizontal: 12, vertical: 2),
+ child: Column(
+ crossAxisAlignment: isMe ? CrossAxisAlignment.end : CrossAxisAlignment.start,
+ children: [
+ if (widget.showName && !isMe)
+ Transform.translate(
+ offset: Offset(effectiveShift, 0),
+ child: Padding(
+ padding: const EdgeInsets.only(bottom: 2),
+ child: Row(
+ mainAxisSize: MainAxisSize.min,
+ children: [
+ const SizedBox(width: 20),
+ Text(
+ widget.msg["senderName"] ?? '',
+ style: TextStyle(
+ fontSize: 14,
+ fontWeight: FontWeight.bold,
+ color: nameColor,
+ ),
+ ),
+ ],
+ ),
+ ),
+ ),
+ Row(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Transform.translate(
+ offset: Offset(effectiveShift, 0),
+ child: ConstrainedBox(
+ constraints: const BoxConstraints(maxWidth: 300),
+ child: BubbleSpecialThree(
+ text: widget.msg["message"] ?? '',
+ color: bubbleColor,
+ isSender: isMe,
+ tail: widget.tail,
+ textStyle: TextStyle(
+ color: textColor,
+ fontSize: 16,
+ ),
+ ),
+ ),
+ ),
+ if (widget.showTime) ...[
+ Spacer(),
+ Align(
+ alignment: Alignment.center,
+ child: Text(
+ widget.msg["timestamp"] ?? '',
+ style: TextStyle(
+ fontSize: 12,
+ color: Colors.white54,
+ ),
+ ),
+ ),
+ ],
+ ],
+ ),
+ ],
+ ),
+ ),
+ ),
+ );
+ }
+}
diff --git a/leaderboard_app/lib/chatpage-components/user_input.dart b/leaderboard_app/lib/chatpage-components/user_input.dart
new file mode 100644
index 0000000..59114da
--- /dev/null
+++ b/leaderboard_app/lib/chatpage-components/user_input.dart
@@ -0,0 +1,89 @@
+import 'package:flutter/material.dart';
+import 'package:pixelarticons/pixel.dart';
+import 'package:provider/provider.dart';
+import '../provider/chat_provider.dart';
+
+class UserInput extends StatelessWidget {
+ final String groupId;
+ final TextEditingController messageController;
+ final FocusNode focusNode;
+ final VoidCallback scrollDownCallback;
+
+ const UserInput({
+ super.key,
+ required this.groupId,
+ required this.messageController,
+ required this.focusNode,
+ required this.scrollDownCallback,
+ });
+
+ @override
+ Widget build(BuildContext context) {
+ final theme = Theme.of(context).colorScheme;
+ final provider = Provider.of(context);
+
+ return SafeArea(
+ child: Padding(
+ padding: const EdgeInsets.fromLTRB(12, 6, 12, 8),
+ child: Column(
+ mainAxisSize: MainAxisSize.min,
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.end,
+ children: [
+ Expanded(
+ child: Container(
+ padding: const EdgeInsets.symmetric(horizontal: 16, vertical: 10),
+ decoration: BoxDecoration(
+ color: Colors.grey[900],
+ borderRadius: BorderRadius.circular(24),
+ ),
+ child: ConstrainedBox(
+ constraints: const BoxConstraints(minHeight: 40, maxHeight: 150),
+ child: Scrollbar(
+ child: Padding(
+ padding: const EdgeInsets.all(8.0),
+ child: TextField(
+ controller: messageController,
+ focusNode: focusNode,
+ maxLines: null,
+ keyboardType: TextInputType.multiline,
+ style: const TextStyle(color: Colors.white),
+ decoration: const InputDecoration(
+ hintText: "Type a message...",
+ hintStyle: TextStyle(color: Colors.white54),
+ border: InputBorder.none,
+ isDense: true,
+ contentPadding: EdgeInsets.zero,
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ ),
+ const SizedBox(width: 8),
+ Padding(
+ padding: const EdgeInsets.only(bottom: 6),
+ child: CircleAvatar(
+ backgroundColor: theme.primary,
+ radius: 22,
+ child: IconButton(
+ onPressed: () {
+ provider.sendMessage(groupId, messageController.text.trim());
+ messageController.clear();
+ scrollDownCallback();
+ },
+ icon: const Icon(Pixel.arrowup, color: Colors.black),
+ ),
+ ),
+ ),
+ ],
+ ),
+ ],
+ ),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/leaderboard_app/lib/config/api_config.dart b/leaderboard_app/lib/config/api_config.dart
new file mode 100644
index 0000000..bbe7779
--- /dev/null
+++ b/leaderboard_app/lib/config/api_config.dart
@@ -0,0 +1,28 @@
+// Centralized API configuration for backend base URL.
+
+/// Priority order:
+/// 1. Compile-time override via --dart-define=API_BASE_URL=...
+/// 2. Baked-in default (production/dev fallback): http://140.238.213.170:3002/api
+///
+/// If you need per-platform localhost behavior again, reintroduce the previous
+/// logic or create an Environment enum.
+class ApiConfig {
+ static const String _dartDefineBaseUrl = String.fromEnvironment('API_BASE_URL');
+
+ /// Returns the base URL (without trailing slash) to use for HTTP requests.
+ static String get baseUrl {
+ if (_dartDefineBaseUrl.isNotEmpty) return _dartDefineBaseUrl.rstrip('/');
+ return 'http://140.238.213.170:3002/api';
+ }
+}
+
+extension _StringTrim on String {
+ String rstrip([String pattern = '/']) {
+ if (isEmpty) return this;
+ var result = this;
+ while (result.endsWith(pattern)) {
+ result = result.substring(0, result.length - pattern.length);
+ }
+ return result;
+ }
+}
diff --git a/leaderboard_app/lib/dashboard-components/compact_calendar.dart b/leaderboard_app/lib/dashboard-components/compact_calendar.dart
new file mode 100644
index 0000000..eed6031
--- /dev/null
+++ b/leaderboard_app/lib/dashboard-components/compact_calendar.dart
@@ -0,0 +1,157 @@
+import 'package:flutter/material.dart';
+
+class CompactCalendar extends StatefulWidget {
+ const CompactCalendar({super.key});
+
+ @override
+ State createState() => _CompactCalendarState();
+}
+
+class _CompactCalendarState extends State {
+ DateTime _selectedDate = DateTime.now();
+
+ final List _months = const [
+ "January",
+ "February",
+ "March",
+ "April",
+ "May",
+ "June",
+ "July",
+ "August",
+ "September",
+ "October",
+ "November",
+ "December",
+ ];
+
+ final List _weekdays = const [
+ "Mon",
+ "Tue",
+ "Wed",
+ "Thu",
+ "Fri",
+ "Sat",
+ "Sun",
+ ];
+
+ final List _years = List.generate(50, (i) => 2000 + i); // 2000–2049
+
+ @override
+ Widget build(BuildContext context) {
+ final colors = Theme.of(context).colorScheme;
+ int year = _selectedDate.year;
+ int month = _selectedDate.month;
+
+ DateTime firstOfMonth = DateTime(year, month, 1);
+ int weekdayOffset = firstOfMonth.weekday == 7 ? 0 : firstOfMonth.weekday;
+ int daysInMonth = DateTime(year, month + 1, 0).day;
+
+ List dayWidgets = [];
+
+ // Blank slots before the month starts
+ for (int i = 1; i < weekdayOffset; i++) {
+ dayWidgets.add(Container());
+ }
+
+ // Day buttons
+ for (int i = 1; i <= daysInMonth; i++) {
+ dayWidgets.add(
+ Container(
+ margin: const EdgeInsets.all(2),
+ alignment: Alignment.center,
+ decoration: BoxDecoration(
+ color: i == _selectedDate.day ? colors.secondary : Colors.transparent,
+ shape: BoxShape.circle,
+ ),
+ child: Text(
+ "$i",
+ style: const TextStyle(color: Colors.white),
+ ),
+ ),
+ );
+ }
+
+ return Container(
+ padding: const EdgeInsets.all(14),
+ width: double.infinity,
+ decoration: BoxDecoration(
+ color: Colors.grey[850],
+ borderRadius: BorderRadius.circular(8),
+ ),
+ child: Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ // Month + Year dropdowns
+ Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ DropdownButton(
+ dropdownColor: Colors.grey[850],
+ value: month,
+ style: const TextStyle(color: Colors.white),
+ underline: Container(),
+ items: List.generate(12, (index) {
+ return DropdownMenuItem(
+ value: index + 1,
+ child: Text(_months[index]),
+ );
+ }),
+ onChanged: (val) {
+ if (val != null) {
+ setState(() {
+ _selectedDate = DateTime(year, val, 1);
+ });
+ }
+ },
+ ),
+ const SizedBox(width: 16),
+ DropdownButton(
+ dropdownColor: Colors.grey[850],
+ value: year,
+ style: const TextStyle(color: Colors.white),
+ underline: Container(),
+ items: _years.map((yr) {
+ return DropdownMenuItem(value: yr, child: Text(yr.toString()));
+ }).toList(),
+ onChanged: (val) {
+ if (val != null) {
+ setState(() {
+ _selectedDate = DateTime(val, month, 1);
+ });
+ }
+ },
+ ),
+ ],
+ ),
+ const SizedBox(height: 10),
+
+ // Weekday headers
+ Row(
+ mainAxisAlignment: MainAxisAlignment.spaceBetween,
+ children: _weekdays.map((day) {
+ return Expanded(
+ child: Center(
+ child: Text(
+ day,
+ style: const TextStyle(color: Colors.grey, fontSize: 12),
+ ),
+ ),
+ );
+ }).toList(),
+ ),
+
+ const SizedBox(height: 6),
+
+ // Calendar grid
+ GridView.count(
+ physics: const NeverScrollableScrollPhysics(),
+ shrinkWrap: true,
+ crossAxisCount: 7,
+ children: dayWidgets,
+ ),
+ ],
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/leaderboard_app/lib/dashboard-components/daily_activity.dart b/leaderboard_app/lib/dashboard-components/daily_activity.dart
new file mode 100644
index 0000000..4bedf6a
--- /dev/null
+++ b/leaderboard_app/lib/dashboard-components/daily_activity.dart
@@ -0,0 +1,119 @@
+import 'package:flutter/material.dart';
+import 'package:leaderboard_app/models/dashboard_models.dart';
+import 'package:url_launcher/url_launcher.dart';
+
+class LeetCodeDailyCard extends StatelessWidget {
+ final DailyQuestion? daily;
+ const LeetCodeDailyCard({super.key, required this.daily});
+
+ @override
+ Widget build(BuildContext context) {
+ final dq = daily;
+ return Container(
+ padding: const EdgeInsets.all(14),
+ width: double.infinity,
+ decoration: BoxDecoration(
+ color: Colors.grey[850],
+ borderRadius: BorderRadius.circular(8),
+ ),
+ child: dq == null
+ ? const Text(
+ 'Daily question unavailable',
+ style: TextStyle(color: Colors.white70, fontSize: 14),
+ )
+ : Column(
+ crossAxisAlignment: CrossAxisAlignment.start,
+ children: [
+ Row(
+ crossAxisAlignment: CrossAxisAlignment.center,
+ children: [
+ Expanded(
+ child: Padding(
+ padding: const EdgeInsets.only(top: 4), // nudge text downward
+ child: Text(
+ dq.questionTitle,
+ style: const TextStyle(
+ color: Colors.white70,
+ fontSize: 16,
+ fontWeight: FontWeight.w500,
+ height: 1.25,
+ ),
+ overflow: TextOverflow.ellipsis,
+ maxLines: 3,
+ softWrap: true,
+ ),
+ ),
+ ),
+ const SizedBox(width: 12),
+ if (dq.difficulty.trim().isNotEmpty)
+ Align(
+ alignment: Alignment.center,
+ child: _DifficultyPill(dq.difficulty),
+ ),
+ ],
+ ),
+ const SizedBox(height: 12),
+ SizedBox(
+ width: double.infinity,
+ child: ElevatedButton(
+ style: ElevatedButton.styleFrom(
+ backgroundColor: Colors.white,
+ foregroundColor: Colors.black,
+ elevation: 0,
+ shape: RoundedRectangleBorder(
+ borderRadius: BorderRadius.circular(8),
+ ),
+ padding: const EdgeInsets.symmetric(vertical: 12, horizontal: 14),
+ ),
+ onPressed: dq.questionLink.isEmpty
+ ? null
+ : () async {
+ final url = Uri.parse(dq.questionLink);
+ if (!await launchUrl(url, mode: LaunchMode.externalApplication)) {
+ // ignore: avoid_print
+ print('Could not launch $url');
+ }
+ },
+ child: Row(
+ mainAxisAlignment: MainAxisAlignment.center,
+ mainAxisSize: MainAxisSize.min,
+ children: const [
+ Text('Go to Question', style: TextStyle(fontWeight: FontWeight.w600)),
+ SizedBox(width: 6),
+ Icon(Icons.north_east, size: 18, color: Colors.black),
+ ],
+ ),
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+}
+
+class _DifficultyPill extends StatelessWidget {
+ final String raw;
+ const _DifficultyPill(this.raw);
+
+ @override
+ Widget build(BuildContext context) {
+ final diff = raw.toLowerCase();
+ final Color bg = diff == 'easy'
+ ? const Color(0xFF6BC864)
+ : diff == 'medium'
+ ? const Color(0xFFFFC44E)
+ : const Color(0xFFFF2727);
+ final label = raw.isEmpty ? raw : raw[0].toUpperCase() + raw.substring(1).toLowerCase();
+ return Container(
+ padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 5),
+ decoration: BoxDecoration(
+ color: bg,
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: Text(
+ label,
+ style: const TextStyle(color: Colors.black, fontSize: 12, fontWeight: FontWeight.w500),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/leaderboard_app/lib/dashboard-components/leaderboard_table.dart b/leaderboard_app/lib/dashboard-components/leaderboard_table.dart
new file mode 100644
index 0000000..a4b0bf2
--- /dev/null
+++ b/leaderboard_app/lib/dashboard-components/leaderboard_table.dart
@@ -0,0 +1,98 @@
+import 'package:flutter/material.dart';
+import 'package:leaderboard_app/models/dashboard_models.dart';
+
+class LeaderboardTable extends StatelessWidget {
+ final List users;
+ const LeaderboardTable({super.key, required this.users});
+
+ @override
+ Widget build(BuildContext context) {
+ return ClipRRect(
+ borderRadius: BorderRadius.circular(12),
+ child: Container(
+ width: double.infinity,
+ color: Colors.grey[850],
+ child: DataTable(
+ columnSpacing: 10,
+ dataRowMinHeight: 32,
+ dataRowMaxHeight: 36,
+ headingRowHeight: 32,
+ headingRowColor: WidgetStateProperty.all(
+ Colors.grey[900],
+ ),
+ columns: const [
+ DataColumn(
+ label: Text(
+ "Place",
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ),
+ ),
+ DataColumn(
+ label: Text(
+ "Player",
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ),
+ ),
+ DataColumn(
+ label: Text(
+ "Streak",
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ),
+ ),
+ DataColumn(
+ label: Text(
+ "Solved",
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ),
+ ),
+ ],
+ rows: List.generate(
+ users.length,
+ (index) => DataRow(
+ cells: [
+ DataCell(
+ Text(
+ "${index + 1}",
+ style: const TextStyle(
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ),
+ ),
+ DataCell(
+ Text(
+ users[index].username,
+ style: const TextStyle(
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ),
+ ),
+ DataCell(Text(
+ "${users[index].streak}",
+ style: const TextStyle(color: Colors.white, fontSize: 12),
+ )),
+ DataCell(Text(
+ "${users[index].totalSolved}",
+ style: const TextStyle(color: Colors.white, fontSize: 12),
+ )),
+ ],
+ ),
+ ),
+ ),
+ ),
+ );
+ }
+}
\ No newline at end of file
diff --git a/leaderboard_app/lib/dashboard-components/problem_table.dart b/leaderboard_app/lib/dashboard-components/problem_table.dart
new file mode 100644
index 0000000..85c81cf
--- /dev/null
+++ b/leaderboard_app/lib/dashboard-components/problem_table.dart
@@ -0,0 +1,151 @@
+import 'package:flutter/material.dart';
+import 'package:leaderboard_app/models/dashboard_models.dart';
+
+class ProblemTable extends StatelessWidget {
+ final List submissions;
+ const ProblemTable({super.key, required this.submissions});
+
+ @override
+ Widget build(BuildContext context) {
+ if (submissions.isEmpty) {
+ return Container(
+ padding: const EdgeInsets.all(16),
+ width: double.infinity,
+ decoration: BoxDecoration(
+ color: Colors.grey[850],
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: const Center(
+ child: Text(
+ 'No recent accepted submissions',
+ style: TextStyle(color: Colors.white54, fontSize: 12),
+ ),
+ ),
+ );
+ }
+
+ return ClipRRect(
+ borderRadius: BorderRadius.circular(12),
+ child: Container(
+ width: double.infinity,
+ decoration: BoxDecoration(
+ color: Colors.grey[850],
+ ),
+ // Use SingleChildScrollView horizontally if titles overflow available width
+ child: LayoutBuilder(
+ builder: (context, constraints) {
+ final maxTitleWidth = (constraints.maxWidth - 12*4) * 0.45; // heuristic for title column
+ return DataTable(
+ columnSpacing: 12,
+ dataRowMinHeight: 32,
+ dataRowMaxHeight: 36,
+ headingRowHeight: 32,
+ headingRowColor: WidgetStateProperty.all(
+ Colors.grey[900],
+ ),
+ columns: const [
+ DataColumn(
+ label: Text(
+ "No.",
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ),
+ ),
+ DataColumn(
+ label: Text(
+ "Title",
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ),
+ ),
+ DataColumn(
+ label: Text(
+ "Accuracy",
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ),
+ ),
+ DataColumn(
+ label: Text(
+ "Level",
+ style: TextStyle(
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ),
+ ),
+ ],
+ rows: List.generate(
+ submissions.length,
+ (index) => DataRow(
+ cells: [
+ DataCell(
+ Text(
+ "${index + 1}",
+ style: const TextStyle(
+ color: Colors.white,
+ fontSize: 12,
+ ),
+ ),
+ ),
+ DataCell(
+ ConstrainedBox(
+ constraints: BoxConstraints(maxWidth: maxTitleWidth.clamp(60, 260)),
+ child: Text(
+ submissions[index].title,
+ style: const TextStyle(color: Colors.white, fontSize: 12),
+ overflow: TextOverflow.ellipsis,
+ ),
+ ),
+ ),
+ DataCell(
+ Text(
+ "${submissions[index].acRate.toStringAsFixed(0)}%",
+ style: const TextStyle(color: Colors.white, fontSize: 12),
+ ),
+ ),
+ DataCell(
+ Builder(builder: (context) {
+ final diff = submissions[index].difficulty.toLowerCase();
+ final Color bg = diff == 'easy'
+ ? const Color(0xFF6BC864)
+ : diff == 'medium'
+ ? const Color(0xFFFFC44E)
+ : const Color(0xFFFF2727);
+ final raw = submissions[index].difficulty.trim();
+ final label = raw.isEmpty
+ ? raw
+ : raw[0].toUpperCase() + raw.substring(1).toLowerCase();
+ return Container(
+ padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 5),
+ decoration: BoxDecoration(
+ color: bg,
+ // Squircle / boxy-pill: moderate radius
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: Text(
+ label,
+ style: const TextStyle(
+ color: Colors.black,
+ fontSize: 12,
+ ),
+ ),
+ );
+ }),
+ ),
+ ],
+ ),
+ ),
+ );
+ },
+ ),
+ ),
+ );
+ }
+}
diff --git a/leaderboard_app/lib/dashboard-components/week_view.dart b/leaderboard_app/lib/dashboard-components/week_view.dart
new file mode 100644
index 0000000..704a1c5
--- /dev/null
+++ b/leaderboard_app/lib/dashboard-components/week_view.dart
@@ -0,0 +1,106 @@
+import 'package:flutter/material.dart';
+
+class WeekView extends StatefulWidget {
+ const WeekView({super.key});
+
+ @override
+ State createState() => _WeekViewState();
+}
+
+class _WeekViewState extends State {
+ ColorScheme get colors => Theme.of(context).colorScheme;
+ final List days = ['Sun', 'Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat'];
+ late final int todayIndex;
+ late final ScrollController _scrollController;
+
+ @override
+ void initState() {
+ super.initState();
+ DateTime now = DateTime.now();
+ todayIndex = now.weekday % 7; // DateTime.weekday: Mon=1..Sun=7, so mod 7 gives Sun=0..Sat=6
+ _scrollController = ScrollController();
+
+ // Wait for the first frame then scroll to the current day
+ WidgetsBinding.instance.addPostFrameCallback((_) {
+ double position = todayIndex * 72.0; // approx item width (60 + margin 12)
+ _scrollController.animateTo(
+ position,
+ duration: const Duration(milliseconds: 400),
+ curve: Curves.easeInOut,
+ );
+ });
+ }
+
+ @override
+ void dispose() {
+ _scrollController.dispose();
+ super.dispose();
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ DateTime now = DateTime.now();
+ String dateText = "${_monthName(now.month)} ${now.day}, ${now.year}";
+
+ return Container(
+ padding: const EdgeInsets.all(14),
+ width: double.infinity,
+ decoration: BoxDecoration(
+ color: Colors.grey[850],
+ borderRadius: BorderRadius.circular(8),
+ ),
+ child: Column(
+ children: [
+ Center(
+ child: Text(
+ dateText,
+ style: const TextStyle(
+ color: Colors.white,
+ fontSize: 16,
+ ),
+ ),
+ ),
+ const SizedBox(height: 12),
+ SizedBox(
+ height: 80,
+ child: ListView.builder(
+ controller: _scrollController,
+ scrollDirection: Axis.horizontal,
+ itemCount: days.length,
+ itemBuilder: (context, index) {
+ bool isToday = index == todayIndex;
+ return Container(
+ margin: const EdgeInsets.symmetric(horizontal: 6),
+ width: 60,
+ decoration: BoxDecoration(
+ color: isToday ? colors.secondary : Colors.grey[900],
+ borderRadius: BorderRadius.circular(10),
+ ),
+ child: Column(
+ mainAxisAlignment: MainAxisAlignment.center,
+ children: [
+ Icon(Icons.check_circle, color: Colors.white),
+ const SizedBox(height: 4),
+ Text(
+ days[index],
+ style: const TextStyle(color: Colors.white),
+ ),
+ ],
+ ),
+ );
+ },
+ ),
+ ),
+ ],
+ ),
+ );
+ }
+
+ String _monthName(int month) {
+ const months = [
+ 'January', 'February', 'March', 'April', 'May', 'June',
+ 'July', 'August', 'September', 'October', 'November', 'December'
+ ];
+ return months[month - 1];
+ }
+}
\ No newline at end of file
diff --git a/leaderboard_app/lib/dashboard-components/weekly_stats.dart b/leaderboard_app/lib/dashboard-components/weekly_stats.dart
new file mode 100644
index 0000000..08925d2
--- /dev/null
+++ b/leaderboard_app/lib/dashboard-components/weekly_stats.dart
@@ -0,0 +1,49 @@
+import 'package:flutter/material.dart';
+
+class WeeklyStats extends StatelessWidget {
+ const WeeklyStats({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return Container(
+ padding: const EdgeInsets.all(12),
+ width: double.infinity,
+ decoration: BoxDecoration(
+ color: Colors.grey[850],
+ borderRadius: BorderRadius.circular(12),
+ ),
+ child: Column(
+ children: [
+ const Center(
+ child: Text(
+ "This Week",
+ style: TextStyle(color: Colors.white, fontSize: 16),
+ ),
+ ),
+ const SizedBox(height: 10),
+ _buildBar("Easy", 0.8, Colors.green),
+ _buildBar("Medium", 0.8, Colors.amber),
+ _buildBar("Hard", 0.8, Colors.red),
+ ],
+ ),
+ );
+ }
+
+ static Widget _buildBar(String label, double value, Color color) {
+ return Row(
+ children: [
+ SizedBox(
+ width: 60,
+ child: Text(label, style: const TextStyle(color: Colors.white)),
+ ),
+ Expanded(
+ child: LinearProgressIndicator(
+ value: value,
+ color: color,
+ backgroundColor: Colors.white24,
+ ),
+ ),
+ ],
+ );
+ }
+}
diff --git a/leaderboard_app/lib/main.dart b/leaderboard_app/lib/main.dart
new file mode 100644
index 0000000..4c4cbf9
--- /dev/null
+++ b/leaderboard_app/lib/main.dart
@@ -0,0 +1,235 @@
+import 'package:flutter/material.dart';
+import 'package:flutter_native_splash/flutter_native_splash.dart';
+import 'package:leaderboard_app/provider/chatlists_provider.dart';
+import 'package:leaderboard_app/provider/chat_provider.dart';
+import 'package:leaderboard_app/provider/theme_provider.dart';
+import 'package:leaderboard_app/provider/user_provider.dart';
+import 'package:provider/provider.dart';
+import 'package:leaderboard_app/router/app_router.dart';
+import 'package:leaderboard_app/services/auth/auth_service.dart';
+import 'package:leaderboard_app/services/dashboard/dashboard_service.dart';
+import 'package:leaderboard_app/services/leetcode/leetcode_service.dart';
+import 'package:leaderboard_app/services/groups/group_service.dart';
+import 'package:leaderboard_app/services/user/user_service.dart';
+import 'package:go_router/go_router.dart';
+import 'package:leaderboard_app/provider/group_provider.dart';
+import 'package:leaderboard_app/provider/dashboard_provider.dart';
+import 'package:leaderboard_app/provider/group_membership_provider.dart';
+import 'package:shared_preferences/shared_preferences.dart';
+import 'package:leaderboard_app/provider/connectivity_provider.dart';
+import 'package:leaderboard_app/pages/no_internet_page.dart';
+
+void main() {
+ final widgetsBinding = WidgetsFlutterBinding.ensureInitialized();
+ FlutterNativeSplash.preserve(widgetsBinding: widgetsBinding);
+ runApp(const Bootstrap());
+}
+
+class Bootstrap extends StatelessWidget {
+ const Bootstrap({super.key});
+
+ @override
+ Widget build(BuildContext context) {
+ return FutureBuilder(
+ future: _bootstrapServices(),
+ builder: (context, snapshot) {
+ if (!snapshot.hasData) {
+ return const MaterialApp(
+ debugShowCheckedModeBanner: false,
+ home: Scaffold(body: Center(child: CircularProgressIndicator())),
+ );
+ }
+
+ final data = snapshot.data!;
+ final authService = data.authService;
+ final dashboardService = data.dashboardService;
+ final leetCodeService = data.leetCodeService;
+ final groupService = data.groupService;
+ final userService = data.userService;
+ final router = createRouter();
+
+ return MultiProvider(
+ providers: [
+ ChangeNotifierProvider(create: (_) => ThemeProvider()),
+ ChangeNotifierProvider(create: (_) => ChatListProvider()),
+ ChangeNotifierProvider(create: (_) => UserProvider()),
+ ChangeNotifierProvider(create: (_) => ChatProvider()),
+ ChangeNotifierProvider(create: (_) => ConnectivityProvider()),
+ ChangeNotifierProvider(create: (ctx) => GroupProvider(groupService)),
+ ChangeNotifierProvider(create: (ctx) => DashboardProvider(
+ service: dashboardService,
+ userProvider: ctx.read(),
+ userService: userService,
+ )),
+ ChangeNotifierProvider(
+ create: (ctx) => GroupMembershipProvider(
+ service: groupService, userProvider: ctx.read())),
+ Provider.value(value: authService),
+ Provider.value(value: dashboardService),
+ Provider.value(value: leetCodeService),
+ Provider.value(value: groupService),
+ Provider.value(value: userService),
+ ],
+ child: _AppInitializer(router: router),
+ );
+ },
+ );
+ }
+}
+
+class _BootstrapData {
+ final AuthService authService;
+ final DashboardService dashboardService;
+ final LeetCodeService leetCodeService;
+ final GroupService groupService;
+ final UserService userService;
+ _BootstrapData({
+ required this.authService,
+ required this.dashboardService,
+ required this.leetCodeService,
+ required this.groupService,
+ required this.userService,
+ });
+}
+
+Future<_BootstrapData> _bootstrapServices() async {
+ final results = await Future.wait([
+ AuthService.create(),
+ DashboardService.create(),
+ LeetCodeService.create(),
+ GroupService.create(),
+ UserService.create(),
+ ]);
+ return _BootstrapData(
+ authService: results[0] as AuthService,
+ dashboardService: results[1] as DashboardService,
+ leetCodeService: results[2] as LeetCodeService,
+ groupService: results[3] as GroupService,
+ userService: results[4] as UserService,
+ );
+}
+
+class _AppInitializer extends StatefulWidget {
+ final GoRouter router;
+ const _AppInitializer({required this.router});
+
+ @override
+ State<_AppInitializer> createState() => _AppInitializerState();
+}
+
+class _AppInitializerState extends State<_AppInitializer> {
+ bool _ready = false;
+ bool _offline = false;
+
+ @override
+ void initState() {
+ super.initState();
+ _init();
+ }
+
+ Future _init() async {
+ // If not logged in, skip any data preload and go straight to router
+ final prefs = await SharedPreferences.getInstance();
+ final token = prefs.getString('authToken') ?? '';
+
+ if (token.isEmpty) {
+ if (mounted) {
+ setState(() => _ready = true);
+ FlutterNativeSplash.remove();
+ }
+ return;
+ }
+
+ final connectivity = context.read();
+ // Wait a tick for connectivity to initialize
+ await Future.delayed(const Duration(milliseconds: 50));
+ _offline = !connectivity.isOnline;
+ if (!_offline) {
+ await _preload();
+ }
+ if (mounted) {
+ setState(() {
+ _ready = true;
+ });
+ FlutterNativeSplash.remove();
+ }
+ // Listen for connectivity changes to leave offline screen automatically
+ connectivity.addListener(() async {
+ if (mounted && _offline && connectivity.isOnline) {
+ setState(() {
+ _offline = false;
+ _ready = false; // show loading while we fetch
+ });
+ await _preload();
+ if (mounted) {
+ setState(() {
+ _ready = true;
+ });
+ }
+ }
+ });
+ }
+
+ Future _preload() async {
+ final prefs = await SharedPreferences.getInstance();
+ final token = prefs.getString('authToken') ?? '';
+ if (token.isEmpty) {
+ // Not logged in; nothing to preload.
+ return;
+ }
+ final returning = prefs.getBool('returningUser') ?? false;
+ final userProvider = context.read();
+ final dashboardProvider = context.read();
+ final userService = context.read();
+
+ // Always fetch profile if logged in (token check can happen in router later but we attempt anyway)
+ try {
+ await userProvider.fetchProfile(userService);
+ } catch (_) {}
+
+ if (returning) {
+ try {
+ await dashboardProvider.loadAll();
+ } catch (_) {}
+ }
+
+ // Mark as returning after first launch completion
+ if (!returning) {
+ await prefs.setBool('returningUser', true);
+ }
+ }
+
+ @override
+ Widget build(BuildContext context) {
+ final connectivity = context.watch();
+ if (!connectivity.isOnline || _offline) {
+ return const MaterialApp(
+ debugShowCheckedModeBanner: false,
+ home: NoInternetPage(),
+ );
+ }
+ if (!_ready) {
+ return const MaterialApp(
+ debugShowCheckedModeBanner: false,
+ home: Scaffold(body: Center(child: CircularProgressIndicator())),
+ );
+ }
+ return MainApp(router: widget.router);
+ }
+}
+
+class MainApp extends StatelessWidget {
+ final GoRouter router;
+ const MainApp({super.key, required this.router});
+
+ @override
+ Widget build(BuildContext context) {
+ final themeProvider = Provider.of(context);
+
+ return MaterialApp.router(
+ debugShowCheckedModeBanner: false,
+ theme: themeProvider.themeData,
+ routerConfig: router,
+ );
+ }
+}
\ No newline at end of file
diff --git a/leaderboard_app/lib/models/api_wrappers.dart b/leaderboard_app/lib/models/api_wrappers.dart
new file mode 100644
index 0000000..fac8847
--- /dev/null
+++ b/leaderboard_app/lib/models/api_wrappers.dart
@@ -0,0 +1,267 @@
+// Generic-ish API response helpers and specific wrapper models for
+// various backend endpoints. These map the `data` object of the backend
+// responses so UI/widgets can depend on strongly typed structures.
+//
+// Each backend response uses the envelope:
+// {
+// "success": bool,
+// "message": String,
+// "timestamp": String (ISO)?,
+// "data": { ... } // shape varies per endpoint
+// }
+//
+// We provide a light-weight [ApiEnvelope] plus concrete data wrappers.
+
+
+import 'auth_models.dart';
+import 'dashboard_models.dart';
+import 'group_models.dart';
+import 'verification_models.dart';
+
+DateTime? _parseTime(dynamic v) {
+ if (v == null) return null;
+ if (v is DateTime) return v;
+ return DateTime.tryParse(v.toString());
+}
+
+/// Base envelope for an API response. The [data] field is left dynamic; most
+/// callers should prefer using the concrete `XYZResponse` classes below.
+class ApiEnvelope {
+ final bool success;
+ final String message;
+ final DateTime? timestamp;
+ final T? data;
+
+ ApiEnvelope({
+ required this.success,
+ required this.message,
+ required this.timestamp,
+ required this.data,
+ });
+
+ factory ApiEnvelope.fromJson(
+ Map json, {
+ T Function(Object? json)? parse,
+ }) {
+ final rawData = json['data'];
+ return ApiEnvelope(
+ success: json['success'] == true,
+ message: (json['message'] ?? '') as String,
+ timestamp: _parseTime(json['timestamp']),
+ data: parse != null ? parse(rawData) : rawData as T?,
+ );
+ }
+}
+
+/// User profile (`GET /user/profile`)
+class UserProfileResponse {
+ final bool success;
+ final String message;
+ final DateTime? timestamp;
+ final User user;
+
+ UserProfileResponse({
+ required this.success,
+ required this.message,
+ required this.timestamp,
+ required this.user,
+ });
+
+ factory UserProfileResponse.fromJson(Map json) {
+ final data = (json['data'] ?? json) as Map;
+ final userJson = (data['user'] ?? data) as Map;
+ return UserProfileResponse(
+ success: json['success'] == true,
+ message: (json['message'] ?? '') as String,
+ timestamp: _parseTime(json['timestamp']),
+ user: User.fromJson(userJson),
+ );
+ }
+}
+
+/// Group list (`GET /groups`)
+class GroupsResponse {
+ final bool success;
+ final String message;
+ final DateTime? timestamp;
+ final PagedGroups groups;
+
+ GroupsResponse({
+ required this.success,
+ required this.message,
+ required this.timestamp,
+ required this.groups,
+ });
+
+ factory GroupsResponse.fromJson(Map json) {
+ final data = (json['data'] ?? {}) as Map;
+ return GroupsResponse(
+ success: json['success'] == true,
+ message: (json['message'] ?? '') as String,
+ timestamp: _parseTime(json['timestamp']),
+ groups: PagedGroups.fromJson(data),
+ );
+ }
+}
+
+/// Single group (`GET /groups/:id`, create, update)
+class GroupResponse {
+ final bool success;
+ final String message;
+ final DateTime? timestamp;
+ final Group group;
+
+ GroupResponse({
+ required this.success,
+ required this.message,
+ required this.timestamp,
+ required this.group,
+ });
+
+ factory GroupResponse.fromJson(Map json) {
+ final data = (json['data'] ?? json) as Map;
+ final groupJson = (data['group'] ?? data) as Map;
+ return GroupResponse(
+ success: json['success'] == true,
+ message: (json['message'] ?? '') as String,
+ timestamp: _parseTime(json['timestamp']),
+ group: Group.fromJson(groupJson),
+ );
+ }
+}
+
+/// LeetCode verification start (`POST /leetcode/connect`)
+class VerificationStartResponse {
+ final bool success;
+ final String message;
+ final DateTime? timestamp;
+ final VerificationStart data;
+
+ VerificationStartResponse({
+ required this.success,
+ required this.message,
+ required this.timestamp,
+ required this.data,
+ });
+
+ factory VerificationStartResponse.fromJson(Map json) {
+ final data = (json['data'] ?? {}) as Map;
+ return VerificationStartResponse(
+ success: json['success'] == true,
+ message: (json['message'] ?? '') as String,
+ timestamp: _parseTime(json['timestamp']),
+ data: VerificationStart.fromJson(data),
+ );
+ }
+}
+
+/// LeetCode verification status (`GET /leetcode/status`)
+class VerificationStatusResponse {
+ final bool success;
+ final String message;
+ final DateTime? timestamp;
+ final VerificationStatus data;
+
+ VerificationStatusResponse({
+ required this.success,
+ required this.message,
+ required this.timestamp,
+ required this.data,
+ });
+
+ factory VerificationStatusResponse.fromJson(Map json) {
+ final data = (json['data'] ?? {}) as Map;
+ return VerificationStatusResponse(
+ success: json['success'] == true,
+ message: (json['message'] ?? '') as String,
+ timestamp: _parseTime(json['timestamp']),
+ data: VerificationStatus.fromJson(data),
+ );
+ }
+}
+
+/// Dashboard submissions (`GET /dashboard/submissions`)
+class SubmissionsResponse {
+ final bool success;
+ final String message;
+ final DateTime? timestamp;
+ final List submissions;
+ final int count;
+ final int limit;
+
+ SubmissionsResponse({
+ required this.success,
+ required this.message,
+ required this.timestamp,
+ required this.submissions,
+ required this.count,
+ required this.limit,
+ });
+
+ factory SubmissionsResponse.fromJson(Map json) {
+ final data = (json['data'] ?? {}) as Map;
+ final list = (data['submissions'] as List?)?.cast