mirror of
https://github.com/immich-app/immich.git
synced 2025-06-23 15:30:51 -04:00
18 lines
503 B
Dart
18 lines
503 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()));
|
|
return drift;
|
|
});
|