💄 Play sfx on confirm dialog as well
This commit is contained in:
@@ -357,6 +357,13 @@ Future<bool> showConfirmAlert(
|
|||||||
IconData? icon,
|
IconData? icon,
|
||||||
bool isDanger = false,
|
bool isDanger = false,
|
||||||
}) async {
|
}) async {
|
||||||
|
final context = globalOverlay.currentState!.context;
|
||||||
|
final ref = ProviderScope.containerOf(context);
|
||||||
|
final settings = ref.read(appSettingsProvider);
|
||||||
|
if (settings.soundEffects) {
|
||||||
|
unawaited(_playSfx('assets/audio/alert.wav', 0.75));
|
||||||
|
}
|
||||||
|
|
||||||
final result = await showOverlayDialog<bool>(
|
final result = await showOverlayDialog<bool>(
|
||||||
builder: (context, close) => ConstrainedBox(
|
builder: (context, close) => ConstrainedBox(
|
||||||
constraints: const BoxConstraints(maxWidth: kDialogMaxWidth),
|
constraints: const BoxConstraints(maxWidth: kDialogMaxWidth),
|
||||||
@@ -446,3 +453,4 @@ Future<void> openExternalLink(Uri url, WidgetRef ref) async {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user