2
0
mirror of https://github.com/inventree/inventree-app.git synced 2025-06-12 18:25:26 +00:00

Adds audio feedback

This commit is contained in:
Oliver Walters
2021-03-02 22:22:16 +11:00
parent 3761f4090f
commit b293806fe3
6 changed files with 93 additions and 10 deletions

View File

@ -1,5 +1,7 @@
import 'package:InvenTree/widget/snacks.dart';
import 'package:audioplayers/audio_cache.dart';
import 'package:audioplayers/audioplayers.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
@ -113,7 +115,9 @@ Future<void> showServerError(String title, String description) async {
title = I18N.of(OneContext().context).serverError;
}
// TODO - Play audio notification
// Play a sound
AudioCache player = AudioCache();
player.play("sounds/server_error.mp3");
showSnackIcon(
title,