init
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
|
||||
|
||||
import 'ch934x_serial_method_channel.dart';
|
||||
|
||||
abstract class Ch934xSerialPlatform extends PlatformInterface {
|
||||
/// Constructs a Ch934xSerialPlatform.
|
||||
Ch934xSerialPlatform() : super(token: _token);
|
||||
|
||||
static final Object _token = Object();
|
||||
|
||||
static Ch934xSerialPlatform _instance = MethodChannelCh934xSerial();
|
||||
|
||||
/// The default instance of [Ch934xSerialPlatform] to use.
|
||||
///
|
||||
/// Defaults to [MethodChannelCh934xSerial].
|
||||
static Ch934xSerialPlatform get instance => _instance;
|
||||
|
||||
/// Platform-specific implementations should set this with their own
|
||||
/// platform-specific class that extends [Ch934xSerialPlatform] when
|
||||
/// they register themselves.
|
||||
static set instance(Ch934xSerialPlatform instance) {
|
||||
PlatformInterface.verifyToken(instance, _token);
|
||||
_instance = instance;
|
||||
}
|
||||
|
||||
Future<String?> getPlatformVersion() {
|
||||
throw UnimplementedError('platformVersion() has not been implemented.');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user