feat(ios):照片loading

This commit is contained in:
2025-10-29 18:13:33 +08:00
parent 0cc51689be
commit 5bb3ebd853
12 changed files with 1561 additions and 7 deletions

View File

@@ -22,6 +22,7 @@ class UploadImagesTool {
int? max,
bool? isVideo,
Widget? isAddOtherWidget,
bool? isShowLoading,
}) async {
await chooseCamera(
context: context,
@@ -34,6 +35,7 @@ class UploadImagesTool {
signature: signature ?? '',
isVideo: isVideo,
isAddOtherWidget: isAddOtherWidget,
isShowLoading: isShowLoading,
chooseImages: (list) => chooseImagesTap?.call(list),
);
}
@@ -95,6 +97,7 @@ class UploadImagesTool {
Function? chooseImages,
bool? isVideo,
Widget? isAddOtherWidget,
bool? isShowLoading,
}) async {
//
showCupertinoModalPopup(
@@ -201,6 +204,7 @@ class UploadImagesTool {
policy: policy ?? '',
callback: callback ?? '',
signature: signature ?? '',
isShowLoading: isShowLoading,
chooseImages: (list) =>
chooseImages?.call(list),
);
@@ -258,6 +262,7 @@ class UploadImagesTool {
String? ossHost,
int? max,
bool? isVideo,
bool? isShowLoading,
}) async {
if (isVideo == true) {
XFile? video = await ImagePicker().pickVideo(source: ImageSource.gallery);
@@ -285,6 +290,7 @@ class UploadImagesTool {
policy: policy ?? '',
callback: callback ?? '',
signature: signature ?? '',
isShowLoading: isShowLoading,
);
list.add(path);
}
@@ -327,6 +333,7 @@ class UploadImagesTool {
String? signature,
String? ossDirectory,
String? ossHost,
bool? isShowLoading,
}) async {
String string = await UploadOss.upload(
path,
@@ -337,6 +344,7 @@ class UploadImagesTool {
policy: policy ?? '',
callback: callback ?? '',
signature: signature ?? '',
isShowLoading: isShowLoading,
);
return string;
}