classify_photo_platform_interface.dart 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. import 'package:plugin_platform_interface/plugin_platform_interface.dart';
  2. import 'classify_photo_method_channel.dart';
  3. abstract class ClassifyPhotoPlatform extends PlatformInterface {
  4. /// Constructs a ClassifyPhotoPlatform.
  5. ClassifyPhotoPlatform() : super(token: _token);
  6. static final Object _token = Object();
  7. static ClassifyPhotoPlatform _instance = MethodChannelClassifyPhoto();
  8. /// The default instance of [ClassifyPhotoPlatform] to use.
  9. ///
  10. /// Defaults to [MethodChannelClassifyPhoto].
  11. static ClassifyPhotoPlatform get instance => _instance;
  12. /// Platform-specific implementations should set this with their own
  13. /// platform-specific class that extends [ClassifyPhotoPlatform] when
  14. /// they register themselves.
  15. static set instance(ClassifyPhotoPlatform instance) {
  16. PlatformInterface.verifyToken(instance, _token);
  17. _instance = instance;
  18. }
  19. Future<String?> getPlatformVersion() {
  20. throw UnimplementedError('platformVersion() has not been implemented.');
  21. }
  22. Future<List<Map<String, dynamic>>?> getPhoto() {
  23. throw UnimplementedError('getPhoto() has not been implemented.');
  24. }
  25. // 添加获取存储信息的方法
  26. Future<Map<String, int>> getStorageInfo() {
  27. throw UnimplementedError('getStorageInfo() has not been implemented.');
  28. }
  29. }