2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-15 03:35:28 +00:00
Files
inventree-app/lib/barcode/tones.dart
Asterix\Oliver 387dc1eb39 Format code
2025-06-14 10:59:13 +10:00

24 lines
562 B
Dart

import "package:inventree/helpers.dart";
import "package:inventree/preferences.dart";
/*
* Play an audible 'success' alert to the user.
*/
Future<void> barcodeSuccessTone() async {
final bool en = await InvenTreeSettingsManager()
.getValue(INV_SOUNDS_BARCODE, true) as bool;
if (en) {
playAudioFile("sounds/barcode_scan.mp3");
}
}
Future<void> barcodeFailureTone() async {
final bool en = await InvenTreeSettingsManager()
.getValue(INV_SOUNDS_BARCODE, true) as bool;
if (en) {
playAudioFile("sounds/barcode_error.mp3");
}
}