updateBluetoothPreference method

Future<PrinterStatus> updateBluetoothPreference(
  1. BluetoothPreference btPre
)

Updates Bluetooth settings of the MW series. Refer to BluetoothPreference. This method does not check if the request has been reflected on the device. Please check using getBluetoothPreference if needed.

Implementation

Future<PrinterStatus> updateBluetoothPreference(BluetoothPreference btPre) async {
  var params = {
    "printerId": mPrinterId,
    "printInfo": mPrinterInfo.toMap(),
    "btPre": btPre.toMap()
  };

  final Map resultMap = await _channel.invokeMethod("updateBluetoothPreference", params);

  PrinterStatus status = PrinterStatus.fromMap(resultMap);
  return status;
}