initializedHiveCacheServiceProvider top-level property
final
Provider for the Hive movie cache service that ensures initialisation. Use this when you need a guaranteed initialised service.
Implementation
final initializedHiveCacheServiceProvider =
FutureProvider<HiveMovieCacheService>((ref) async {
final service = HiveMovieCacheService();
await service.initialize();
// Ensure the service is disposed when the provider is disposed.
ref.onDispose(() {
service.dispose();
});
return service;
});