migrated timetable integration from WebUntis to the MarianumConnect API, implementing a Dio-based client with bearer token authentication, background session validation, and auto-refresh logic.

This commit is contained in:
2026-05-23 17:32:42 +02:00
parent 2858f910c9
commit 93b9929f8f
106 changed files with 2739 additions and 2624 deletions
@@ -0,0 +1,22 @@
import '../../storage/dev_tools_settings.dart';
/// Singleton holding the currently active Marianum-Connect base URL. Fed by a
/// SettingsCubit listener in app.dart so every dio call picks up endpoint
/// changes without holding a reference to the cubit.
class MarianumConnectEndpoint {
static String _baseUrl = DevToolsSettings.liveUrl;
static String current() => _baseUrl;
static void update(String baseUrl) {
_baseUrl = baseUrl;
}
/// Joins the base URL with the mobile API prefix and the given path.
static String resolve(String relativePath) {
final path = relativePath.startsWith('/')
? relativePath.substring(1)
: relativePath;
return '$_baseUrl/api/mobile/v1/$path';
}
}