connect method
connect let you connect to a network printer
Implementation
Future connect({Duration? timeout = const Duration(seconds: 5)}) async {
try {
this.socket = await Socket.connect(
printer.address,
printer.port!,
timeout: timeout,
);
} catch (e) {
return Future.error(e.toString());
}
}