added clear message for denied camera or gallery access
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user