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
+5 -2
View File
@@ -42,7 +42,7 @@ Future<AvatarSheetResult?> showAvatarActionsSheet(
onTap: () async {
final bytes = await _pickAndCrop(
sheetContext,
FilePick.singleGalleryPick,
() => FilePick.singleGalleryPick(sheetContext),
);
if (bytes == null || !sheetContext.mounted) return;
result = AvatarUploadResult(bytes);
@@ -53,7 +53,10 @@ Future<AvatarSheetResult?> showAvatarActionsSheet(
leading: const Icon(Icons.photo_camera_outlined),
title: const Text('Foto aufnehmen'),
onTap: () async {
final bytes = await _pickAndCrop(sheetContext, FilePick.cameraPick);
final bytes = await _pickAndCrop(
sheetContext,
() => FilePick.cameraPick(sheetContext),
);
if (bytes == null || !sheetContext.mounted) return;
result = AvatarUploadResult(bytes);
Navigator.of(sheetContext).pop();