init abstract method

Future<void> init({
  1. required String macAddress,
  2. OnPrinterConnectionChange? onPrinterConnectionChange,
  3. OnPrinterOperationChange? onDocPrinted,
})

Initializes the Rongta printer with the provided parameters.

The macAddress parameter specifies the MAC address of the printer. The onPrinterConnectionChange parameter (optional) is a callback function that will be invoked when the printer connection status changes. The onDocPrinted parameter (optional) is a callback function that will be invoked when a document is successfully printed.

Returns a Future that completes when the initialization is finished.

Implementation

Future<void> init({
  required String macAddress,
  OnPrinterConnectionChange? onPrinterConnectionChange,
  OnPrinterOperationChange? onDocPrinted,
});