Image can not be upload through document in iOs #484

This commit is contained in:
Hillel Coren 2023-05-31 09:00:10 +03:00
parent e44142d98b
commit 87008c2065
1 changed files with 20 additions and 20 deletions

View File

@ -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);
}
},
),
),
],
],
),
)