2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-30 19:00:49 +00:00
Files
inventree-app/lib/barcode/tones.dart
Ben Hagen 4444884afa Format Code and Add Format Checks to CI (#643)
* Remove unused lib/generated/i18n.dart

* Use `fvm dart format .`

* Add contributing guidelines

* Enforce dart format

* Add `dart format off` directive to generated files
2025-06-24 09:55:01 +10:00

26 lines
580 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");
}
}