Line data Source code
1 : import 'package:plugin_platform_interface/plugin_platform_interface.dart';
2 :
3 : import 'vpn_detector_method_channel.dart';
4 :
5 : abstract class VpnDetectorPlatform extends PlatformInterface {
6 : /// Constructs a VpnDetectorPlatform.
7 9 : VpnDetectorPlatform() : super(token: _token);
8 :
9 9 : static final Object _token = Object();
10 :
11 6 : static VpnDetectorPlatform _instance = MethodChannelVpnDetector();
12 :
13 : /// The default instance of [VpnDetectorPlatform] to use.
14 : ///
15 : /// Defaults to [MethodChannelVpnDetector].
16 4 : static VpnDetectorPlatform get instance => _instance;
17 :
18 : /// Platform-specific implementations should set this with their own
19 : /// platform-specific class that extends [VpnDetectorPlatform] when
20 : /// they register themselves.
21 2 : static set instance(VpnDetectorPlatform instance) {
22 4 : PlatformInterface.verifyToken(instance, _token);
23 : _instance = instance;
24 : }
25 :
26 1 : Future<bool> isVpnActive() {
27 1 : throw UnimplementedError('isVpnActive() has not been implemented.');
28 : }
29 : }
|