getBluetoothPreference method
Gets Bluetooth settings from the MW series. Refer to BluetoothPreference.
Implementation
Future<PrinterStatus> getBluetoothPreference(BluetoothPreference btPre) async {
var params = {
"printerId": mPrinterId,
"printInfo": mPrinterInfo.toMap(),
};
final Map resultMap = await _channel.invokeMethod("getBluetoothPreference", params);
PrinterStatus status = PrinterStatus.fromMap(resultMap["printerStatus"]);
BluetoothPreference resultPrefs = BluetoothPreference.fromMap(resultMap["btPre"]);
btPre.authMode = resultPrefs.authMode;
btPre.enableSsp = resultPrefs.enableSsp;
btPre.powerMode = resultPrefs.powerMode;
return status;
}