You've already forked immich
mirror of
https://github.com/immich-app/immich.git
synced 2025-07-07 06:16:05 +02:00
24 lines
674 B
Dart
24 lines
674 B
Dart
![]() |
import 'package:hooks_riverpod/hooks_riverpod.dart';
|
||
|
import 'package:immich_mobile/models/upload/share_intent_attachment.model.dart';
|
||
|
import 'package:immich_mobile/repositories/share_handler.repository.dart';
|
||
|
|
||
|
final shareIntentServiceProvider = Provider(
|
||
|
(ref) => ShareIntentService(
|
||
|
ref.watch(shareHandlerRepositoryProvider),
|
||
|
),
|
||
|
);
|
||
|
|
||
|
class ShareIntentService {
|
||
|
final ShareHandlerRepository shareHandlerRepository;
|
||
|
void Function(List<ShareIntentAttachment> attachments)? onSharedMedia;
|
||
|
|
||
|
ShareIntentService(
|
||
|
this.shareHandlerRepository,
|
||
|
);
|
||
|
|
||
|
void init() {
|
||
|
shareHandlerRepository.onSharedMedia = onSharedMedia;
|
||
|
shareHandlerRepository.init();
|
||
|
}
|
||
|
}
|