From 87008c2065e1a010b64f233a2f9201dbd3c6e98b Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Wed, 31 May 2023 09:00:10 +0300 Subject: [PATCH] Image can not be upload through document in iOs #484 --- lib/ui/app/document_grid.dart | 40 +++++++++++++++++------------------ 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/lib/ui/app/document_grid.dart b/lib/ui/app/document_grid.dart index 015b5014d..f64e04170 100644 --- a/lib/ui/app/document_grid.dart +++ b/lib/ui/app/document_grid.dart @@ -91,7 +91,26 @@ class DocumentGrid extends StatelessWidget { }, ), ), - SizedBox(width: isIOS() ? 8 : 14), + SizedBox(width: 12), + ], + if (isIOS()) ...[ + SizedBox(width: 12), + Expanded( + child: AppButton( + label: localization.gallery, + onPressed: () async { + final multipartFile = await pickFile( + fileIndex: 'documents[]', + allowedExtensions: DocumentEntity.ALLOWED_EXTENSIONS, + fileType: FileType.image, + ); + + if (multipartFile != null) { + onUploadDocument(multipartFile); + } + }, + ), + ), ], Expanded( child: AppButton( @@ -110,25 +129,6 @@ class DocumentGrid extends StatelessWidget { }, ), ), - if (isIOS()) ...[ - SizedBox(width: isIOS() ? 8 : 14), - Expanded( - child: AppButton( - label: localization.gallery, - onPressed: () async { - final multipartFile = await pickFile( - fileIndex: 'documents[]', - allowedExtensions: DocumentEntity.ALLOWED_EXTENSIONS, - fileType: FileType.image, - ); - - if (multipartFile != null) { - onUploadDocument(multipartFile); - } - }, - ), - ), - ], ], ), )