mirror of
				https://github.com/immich-app/immich.git
				synced 2025-10-31 10:37:11 -04:00 
			
		
		
		
	
		
			
				
	
	
		
			19 lines
		
	
	
		
			522 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			522 B
		
	
	
	
		
			Dart
		
	
	
	
	
	
| import 'dart:async';
 | |
| 
 | |
| import 'package:hooks_riverpod/hooks_riverpod.dart';
 | |
| import 'package:immich_mobile/infrastructure/repositories/db.repository.dart';
 | |
| import 'package:isar/isar.dart';
 | |
| import 'package:riverpod_annotation/riverpod_annotation.dart';
 | |
| 
 | |
| part 'db.provider.g.dart';
 | |
| 
 | |
| @Riverpod(keepAlive: true)
 | |
| Isar isar(Ref ref) => throw UnimplementedError('isar');
 | |
| 
 | |
| final driftProvider = Provider<Drift>((ref) {
 | |
|   final drift = Drift();
 | |
|   ref.onDispose(() => unawaited(drift.close()));
 | |
|   ref.keepAlive();
 | |
|   return drift;
 | |
| });
 |