added clear message for denied camera or gallery access

This commit is contained in:
2026-09-02 20:31:44 +02:00
parent f19f212fb4
commit 43dfc52bc7
8 changed files with 146 additions and 21 deletions
+4 -2
View File
@@ -21,7 +21,9 @@ Future<Uint8List?> showChatBackgroundPickerSheet(BuildContext context) async {
leading: const Icon(Icons.photo_library_outlined),
title: const Text('Aus Galerie wählen'),
onTap: () async {
final bytes = await _pickRaw(FilePick.singleGalleryPick);
final bytes = await _pickRaw(
() => FilePick.singleGalleryPick(sheetContext),
);
if (bytes == null || !sheetContext.mounted) return;
result = bytes;
Navigator.of(sheetContext).pop();
@@ -31,7 +33,7 @@ Future<Uint8List?> showChatBackgroundPickerSheet(BuildContext context) async {
leading: const Icon(Icons.photo_camera_outlined),
title: const Text('Foto aufnehmen'),
onTap: () async {
final bytes = await _pickRaw(FilePick.cameraPick);
final bytes = await _pickRaw(() => FilePick.cameraPick(sheetContext));
if (bytes == null || !sheetContext.mounted) return;
result = bytes;
Navigator.of(sheetContext).pop();