| 123456789101112131415161718192021222324252627282930313233 |
- /// 媒体服务模块
- ///
- /// 提供统一的图片选择、拍照、压缩和处理功能
- ///
- /// 使用示例:
- /// ```dart
- /// import 'package:sino_med_cloud/media/media.dart';
- ///
- /// // 快捷方式:从相册选择并自动压缩
- /// final file = await MediaService.pickFromGallery();
- ///
- /// // 快捷方式:使用系统相机拍照并自动压缩
- /// final photo = await MediaService.pickFromCamera();
- ///
- /// // 专业相机(需要手动管理生命周期)
- /// final cameraService = CameraService();
- /// await cameraService.init();
- /// final photo = await cameraService.takePicture();
- /// cameraService.dispose();
- ///
- /// // 图片处理
- /// final compressed = await MediaService.compressImage(photo!);
- /// final info = await MediaService.getImageInfo(compressed);
- /// final cleaned = await MediaService.removeExif(compressed);
- /// ```
- library media;
- export 'media_service.dart';
- export 'picker_service.dart';
- export 'camera_service.dart';
- export 'image_processor.dart';
- export 'media_exception.dart';
|