Merge branch 'develop'
This commit is contained in:
commit
7dc89df640
|
|
@ -40,15 +40,21 @@ Future<List<MultipartFile>?> pickFiles({
|
||||||
allowMultiple: allowMultiple,
|
allowMultiple: allowMultiple,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
final androidInfo = await DeviceInfoPlugin().androidInfo;
|
PermissionStatus? status;
|
||||||
PermissionStatus status;
|
|
||||||
|
|
||||||
if (Platform.isIOS && fileType == FileType.image) {
|
if (Platform.isIOS) {
|
||||||
status = await Permission.photos.request();
|
if (fileType == FileType.image) {
|
||||||
} else if (Platform.isAndroid && androidInfo.version.sdkInt >= 33) {
|
status = await Permission.photos.request();
|
||||||
status = await Permission.photos.request();
|
} else {
|
||||||
} else {
|
status = await Permission.storage.request();
|
||||||
status = await Permission.storage.request();
|
}
|
||||||
|
} else if (Platform.isAndroid) {
|
||||||
|
final androidInfo = await DeviceInfoPlugin().androidInfo;
|
||||||
|
if (androidInfo.version.sdkInt >= 33) {
|
||||||
|
status = await Permission.photos.request();
|
||||||
|
} else {
|
||||||
|
status = await Permission.storage.request();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (status == PermissionStatus.granted) {
|
if (status == PermissionStatus.granted) {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue