import 'package:flutter/foundation.dart'; import 'package:flutter/services.dart'; import 'jc_printer_platform_interface.dart'; /// An implementation of [JcPrinterPlatform] that uses method channels. class MethodChannelJcPrinter extends JcPrinterPlatform { /// The method channel used to interact with the native platform. @visibleForTesting final methodChannel = const MethodChannel('jc_printer'); @override Future getPlatformVersion() async { final version = await methodChannel.invokeMethod('getPlatformVersion'); return version; } @override void connect() async { final result = await methodChannel.invokeMethod('connect'); print(result); } }