feat: Introduce offline synchronization for time registrations via a new sync service.

This commit is contained in:
steinhelge
2025-11-24 21:23:20 +01:00
parent 237d56066b
commit e05d694218
10 changed files with 367 additions and 76 deletions
+11 -2
View File
@@ -4,6 +4,8 @@ import 'package:flutter_riverpod/flutter_riverpod.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'screens/auth/login_screen.dart';
import 'screens/home/home_screen.dart';
import 'services/sync_service.dart';
import 'providers/time_provider.dart';
import 'providers/auth_provider.dart';
void main() async {
@@ -15,9 +17,16 @@ void main() async {
// Initialiser Hive for offline støtte
await Hive.initFlutter();
// Initialiser SyncService
final syncService = SyncService();
await syncService.init();
runApp(
const ProviderScope(
child: TimeRegApp(),
ProviderScope(
overrides: [
syncServiceProvider.overrideWithValue(syncService),
],
child: const TimeRegApp(),
),
);
}