| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960 |
- import 'dart:ffi';
- import 'classify_photo_platform_interface.dart';
- class ClassifyPhoto {
- Future<String?> getPlatformVersion() {
- return ClassifyPhotoPlatform.instance.getPlatformVersion();
- }
- Future<List<Map<String, dynamic>>?> getPhoto() {
- return ClassifyPhotoPlatform.instance.getPhoto();
- }
- // 新增的分离方法
- // 获取截图
- Future<List<Map<String, dynamic>>?> getScreenshots() {
- return ClassifyPhotoPlatform.instance.getScreenshots();
- }
- // 获取模糊照片
- Future<List<Map<String, dynamic>>?> getBlurryPhotos() {
- return ClassifyPhotoPlatform.instance.getBlurryPhotos();
- }
- // 获取人物照片
- Future<List<Map<String, dynamic>>?> getPeoplePhotos() {
- return ClassifyPhotoPlatform.instance.getPeoplePhotos();
- }
- // 获取相似照片
- Future<List<Map<String, dynamic>>?> getSimilarPhotos() {
- return ClassifyPhotoPlatform.instance.getSimilarPhotos();
- }
- Future<Map<String, int>> getStorageInfo() {
- return ClassifyPhotoPlatform.instance.getStorageInfo();
- }
- Future<bool> checkTrialEligibility(String appleId) {
- return ClassifyPhotoPlatform.instance.checkTrialEligibility(appleId);
- }
- Future<Map<String, dynamic>> getPhotoExif(String filePath) async {
- try {
- return await ClassifyPhotoPlatform.instance.getPhotoExif(filePath);
- } catch (e) {
- print('获取照片 EXIF 信息失败: $e');
- return {};
- }
- }
- Future<void> finishTransaction() {
- return ClassifyPhotoPlatform.instance.finishTransaction();
- }
- Future<int> calculatePhotosSize(List<String> assetIds) {
- return ClassifyPhotoPlatform.instance.calculatePhotoSize(assetIds);
- }
- }
|