immich/mobile/lib/services/share_intent_service.dart
Adam Gastineau e7aace436d
chore(mobile): Apply stricter linting rules for correctness (#30372)
* chore(mobile): Apply stricter linting rules for correctness

* Added discarded_futures rule
2026-07-30 19:39:24 +00:00

19 lines
684 B
Dart

import 'dart:async';
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;
unawaited(shareHandlerRepository.init());
}
}