flutter_jc_printer_plugin/lib/jc_printer_platform_interface.dart
2023-10-20 17:45:24 +08:00

34 lines
1.0 KiB
Dart

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