2023-10-20 13:49:23 +08:00
|
|
|
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.');
|
|
|
|
}
|
2023-10-20 17:45:24 +08:00
|
|
|
|
2023-10-22 12:31:46 +08:00
|
|
|
Future<bool> connect(String name) async {
|
2023-10-20 17:45:24 +08:00
|
|
|
throw UnimplementedError('connect() has not been implemented.');
|
|
|
|
}
|
2023-10-20 13:49:23 +08:00
|
|
|
}
|