connect method
Connects to a Zebra printer and maintains the connection
address Printer address (MAC address for Bluetooth or IP for Network)
Returns true if connected successfully, false otherwise
Implementation
Future<bool> connect(String address) async {
try {
print('[PrinterManager] connect called for address: $address');
final result = await _channel.invokeMethod('connect', {'address': address});
print('[PrinterManager] connect result: $result');
return result as bool? ?? false;
} on PlatformException catch (e) {
print('[PrinterManager] connect error: ${e.code} - ${e.message}');
throw Exception("Connection Error (${e.code}): ${e.message}");
}
}