mirror of
https://gitee.com/farsunset/cim.git
synced 2025-07-18 05:56:16 +08:00
30 lines
1011 B
Dart
30 lines
1011 B
Dart
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
|
|
|
|
import 'cim_flutter_sdk_method_channel.dart';
|
|
|
|
abstract class CimFlutterSdkPlatform extends PlatformInterface {
|
|
/// Constructs a CimFlutterSdkPlatform.
|
|
CimFlutterSdkPlatform() : super(token: _token);
|
|
|
|
static final Object _token = Object();
|
|
|
|
static CimFlutterSdkPlatform _instance = MethodChannelCimFlutterSdk();
|
|
|
|
/// The default instance of [CimFlutterSdkPlatform] to use.
|
|
///
|
|
/// Defaults to [MethodChannelCimFlutterSdk].
|
|
static CimFlutterSdkPlatform get instance => _instance;
|
|
|
|
/// Platform-specific implementations should set this with their own
|
|
/// platform-specific class that extends [CimFlutterSdkPlatform] when
|
|
/// they register themselves.
|
|
static set instance(CimFlutterSdkPlatform instance) {
|
|
PlatformInterface.verifyToken(instance, _token);
|
|
_instance = instance;
|
|
}
|
|
|
|
Future<String?> getPlatformVersion() {
|
|
throw UnimplementedError('platformVersion() has not been implemented.');
|
|
}
|
|
}
|