30 lines
955 B
Dart
30 lines
955 B
Dart
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
|
|
|
|
import 'media_sdk_method_channel.dart';
|
|
|
|
abstract class MediaSdkPlatform extends PlatformInterface {
|
|
/// Constructs a MediaSdkPlatform.
|
|
MediaSdkPlatform() : super(token: _token);
|
|
|
|
static final Object _token = Object();
|
|
|
|
static MediaSdkPlatform _instance = MethodChannelMediaSdk();
|
|
|
|
/// The default instance of [MediaSdkPlatform] to use.
|
|
///
|
|
/// Defaults to [MethodChannelMediaSdk].
|
|
static MediaSdkPlatform get instance => _instance;
|
|
|
|
/// Platform-specific implementations should set this with their own
|
|
/// platform-specific class that extends [MediaSdkPlatform] when
|
|
/// they register themselves.
|
|
static set instance(MediaSdkPlatform instance) {
|
|
PlatformInterface.verifyToken(instance, _token);
|
|
_instance = instance;
|
|
}
|
|
|
|
Future<String?> getPlatformVersion() {
|
|
throw UnimplementedError('platformVersion() has not been implemented.');
|
|
}
|
|
}
|