added camera support and enabled gallery selection on ios
This commit is contained in:
@@ -26,6 +26,8 @@
|
|||||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||||
<key>LSRequiresIPhoneOS</key>
|
<key>LSRequiresIPhoneOS</key>
|
||||||
<true/>
|
<true/>
|
||||||
|
<key>NSCameraUsageDescription</key>
|
||||||
|
<string>Um Fotos direkt aus der App aufnehmen und teilen zu können wird Zugriff auf die Kamera benötigt.</string>
|
||||||
<key>NSPhotoLibraryUsageDescription</key>
|
<key>NSPhotoLibraryUsageDescription</key>
|
||||||
<string>Um Medien mit anderen zu teilen wird Zugriff zu deine Dateien benötigt.</string>
|
<string>Um Medien mit anderen zu teilen wird Zugriff zu deine Dateien benötigt.</string>
|
||||||
<key>UIApplicationSupportsIndirectInputEvents</key>
|
<key>UIApplicationSupportsIndirectInputEvents</key>
|
||||||
|
|||||||
@@ -181,11 +181,9 @@ class _ChatTextfieldState extends State<ChatTextfield> {
|
|||||||
Navigator.of(dialogCtx).pop();
|
Navigator.of(dialogCtx).pop();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
Visibility(
|
ListTile(
|
||||||
visible: !Platform.isIOS,
|
|
||||||
child: ListTile(
|
|
||||||
leading: const Icon(Icons.image),
|
leading: const Icon(Icons.image),
|
||||||
title: const Text('Aus Gallerie auswählen'),
|
title: const Text('Aus Galerie auswählen'),
|
||||||
onTap: () {
|
onTap: () {
|
||||||
FilePick.multipleGalleryPick().then((value) {
|
FilePick.multipleGalleryPick().then((value) {
|
||||||
if (value != null) mediaUpload(value.map((e) => e.path).toList());
|
if (value != null) mediaUpload(value.map((e) => e.path).toList());
|
||||||
@@ -193,6 +191,15 @@ class _ChatTextfieldState extends State<ChatTextfield> {
|
|||||||
Navigator.of(dialogCtx).pop();
|
Navigator.of(dialogCtx).pop();
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
|
ListTile(
|
||||||
|
leading: const Icon(Icons.camera_alt_outlined),
|
||||||
|
title: const Text('Foto aufnehmen'),
|
||||||
|
onTap: () {
|
||||||
|
FilePick.cameraPick().then((image) {
|
||||||
|
if (image != null) mediaUpload([image.path]);
|
||||||
|
});
|
||||||
|
Navigator.of(dialogCtx).pop();
|
||||||
|
},
|
||||||
),
|
),
|
||||||
]));
|
]));
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user