system_share_platform_interface.dart 1.2 KB

123456789101112131415161718192021222324252627282930313233343536
  1. import 'dart:io';
  2. import 'package:plugin_platform_interface/plugin_platform_interface.dart';
  3. import 'system_share_method_channel.dart';
  4. abstract class SystemSharePlatform extends PlatformInterface {
  5. /// Constructs a SystemSharePlatform.
  6. SystemSharePlatform() : super(token: _token);
  7. static final Object _token = Object();
  8. static SystemSharePlatform _instance = MethodChannelSystemShare();
  9. /// The default instance of [SystemSharePlatform] to use.
  10. ///
  11. /// Defaults to [MethodChannelSystemShare].
  12. static SystemSharePlatform get instance => _instance;
  13. /// Platform-specific implementations should set this with their own
  14. /// platform-specific class that extends [SystemSharePlatform] when
  15. /// they register themselves.
  16. static set instance(SystemSharePlatform instance) {
  17. PlatformInterface.verifyToken(instance, _token);
  18. _instance = instance;
  19. }
  20. Future<bool> isInstalled(String packageName) async {
  21. throw UnimplementedError('isInstalled() has not been implemented.');
  22. }
  23. void shareFile(String filePath, String packageName, String? shareTitle,
  24. {String? shareFileType}) async {
  25. throw UnimplementedError('shareFile() has not been implemented.');
  26. }
  27. }