Files
MWClash/plugins/proxy/lib/proxy_platform_interface.dart

31 lines
853 B
Dart
Raw Normal View History

2024-04-30 23:38:49 +08:00
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
import 'proxy_method_channel.dart';
abstract class ProxyPlatform extends PlatformInterface {
/// Constructs a ProxyPlatform.
ProxyPlatform() : super(token: _token);
static final Object _token = Object();
static ProxyPlatform _instance = MethodChannelProxy();
/// The default instance of [ProxyPlatform] to use.
///
/// Defaults to [MethodChannelProxy].
static ProxyPlatform get instance => _instance;
static set instance(ProxyPlatform instance) {
PlatformInterface.verifyToken(instance, _token);
_instance = instance;
}
Future<bool?> startProxy(int port) {
2024-04-30 23:38:49 +08:00
throw UnimplementedError('startProxy() has not been implemented.');
}
Future<bool?> stopProxy() {
throw UnimplementedError('stopProxy() has not been implemented.');
}
}