vnote_device_plugin_platform_interface.dart 1.1 KB

123456789101112131415161718192021222324252627282930313233
  1. import 'package:plugin_platform_interface/plugin_platform_interface.dart';
  2. import 'vnote_device_plugin_method_channel.dart';
  3. abstract class VnoteDevicePluginPlatform extends PlatformInterface {
  4. /// Constructs a VnoteDevicePluginPlatform.
  5. VnoteDevicePluginPlatform() : super(token: _token);
  6. static final Object _token = Object();
  7. static VnoteDevicePluginPlatform _instance = MethodChannelVnoteDevicePlugin();
  8. /// The default instance of [VnoteDevicePluginPlatform] to use.
  9. ///
  10. /// Defaults to [MethodChannelVnoteDevicePlugin].
  11. static VnoteDevicePluginPlatform get instance => _instance;
  12. /// Platform-specific implementations should set this with their own
  13. /// platform-specific class that extends [VnoteDevicePluginPlatform] when
  14. /// they register themselves.
  15. static set instance(VnoteDevicePluginPlatform 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<void> callAction(String action, Map<String, dynamic> data);
  23. Future<void> init();
  24. }