feat: Introduce offline synchronization for time registrations via a new sync service.
This commit is contained in:
+11
-2
@@ -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(),
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user