fixed several runtime errors from client error reports

This commit is contained in:
2026-09-26 00:06:18 +02:00
parent 56a497985b
commit d6130584f2
6 changed files with 39 additions and 10 deletions
+4 -2
View File
@@ -22,7 +22,7 @@ Future<Uint8List?> showChatBackgroundPickerSheet(BuildContext context) async {
title: const Text('Aus Galerie wählen'),
onTap: () async {
final bytes = await _pickRaw(
() => FilePick.singleGalleryPick(sheetContext),
() => FilePick.singleGalleryPick(sheetContext, forCrop: true),
);
if (bytes == null || !sheetContext.mounted) return;
result = bytes;
@@ -33,7 +33,9 @@ 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(sheetContext));
final bytes = await _pickRaw(
() => FilePick.cameraPick(sheetContext, forCrop: true),
);
if (bytes == null || !sheetContext.mounted) return;
result = bytes;
Navigator.of(sheetContext).pop();