mirror of
https://github.com/inventree/inventree-app.git
synced 2025-06-15 03:35:28 +00:00
24 lines
562 B
Dart
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");
|
|
}
|
|
}
|