classify_photo_platform_interface.dart 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. import 'dart:ffi';
  2. import 'package:plugin_platform_interface/plugin_platform_interface.dart';
  3. import 'classify_photo_method_channel.dart';
  4. abstract class ClassifyPhotoPlatform extends PlatformInterface {
  5. /// Constructs a ClassifyPhotoPlatform.
  6. ClassifyPhotoPlatform() : super(token: _token);
  7. static final Object _token = Object();
  8. static ClassifyPhotoPlatform _instance = MethodChannelClassifyPhoto();
  9. /// The default instance of [ClassifyPhotoPlatform] to use.
  10. ///
  11. /// Defaults to [MethodChannelClassifyPhoto].
  12. static ClassifyPhotoPlatform get instance => _instance;
  13. /// Platform-specific implementations should set this with their own
  14. /// platform-specific class that extends [ClassifyPhotoPlatform] when
  15. /// they register themselves.
  16. static set instance(ClassifyPhotoPlatform instance) {
  17. PlatformInterface.verifyToken(instance, _token);
  18. _instance = instance;
  19. }
  20. Future<String?> getPlatformVersion() {
  21. throw UnimplementedError('platformVersion() has not been implemented.');
  22. }
  23. Future<List<Map<String, dynamic>>?> getPhoto() {
  24. throw UnimplementedError('getPhoto() has not been implemented.');
  25. }
  26. // 添加获取存储信息的方法
  27. Future<Map<String, int>> getStorageInfo() {
  28. throw UnimplementedError('getStorageInfo() has not been implemented.');
  29. }
  30. // 检查是否试用
  31. Future<bool> checkTrialEligibility(String appleId) {
  32. throw UnimplementedError('checkTrialEligibility() has not been implemented.');
  33. }
  34. /// 获取照片 EXIF 信息
  35. Future<Map<String, dynamic>> getPhotoExif(String filePath) {
  36. throw UnimplementedError('getPhotoExif() has not been implemented.');
  37. }
  38. Future<void> finishTransaction() {
  39. throw UnimplementedError('finishTransaction() has not been implemented.');
  40. }
  41. Future<int> calculatePhotoSize(List<String> assetIds) {
  42. throw UnimplementedError('finishTransaction() has not been implemented.');
  43. }
  44. }