Skip to content

Commit

Permalink
Rename to onProgress
Browse files Browse the repository at this point in the history
  • Loading branch information
seanconnollydev committed Oct 6, 2021
1 parent 03e791f commit 0a92e31
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion example/lib/src/image_picker_example.dart
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class _ImagePickerExampleState extends State<ImagePickerExample> {
'caption': 'An example image',
},
),
onSendProgress: (count, total) {
onProgress: (count, total) {
setState(() {
_uploadingPercentage = (count / total) * 100;
});
Expand Down
8 changes: 4 additions & 4 deletions lib/src/cloudinary_public.dart
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class CloudinaryPublic {
Future<CloudinaryResponse> uploadFile(
CloudinaryFile file, {
String? uploadPreset,
ProgressCallback? onSendProgress,
ProgressCallback? onProgress,
}) async {
if (cache) {
assert(file.identifier != null, 'identifier is required for caching');
Expand All @@ -82,7 +82,7 @@ class CloudinaryPublic {
'POST',
Uri.parse(url),
onProgress: (count, total) {
onSendProgress?.call(count, total);
onProgress?.call(count, total);
},
);

Expand Down Expand Up @@ -154,12 +154,12 @@ class CloudinaryPublic {
Future<CloudinaryResponse> uploadFutureFile(
Future<CloudinaryFile> file, {
String? uploadPreset,
ProgressCallback? onSendProgress,
ProgressCallback? onProgress,
}) async {
return uploadFile(
await file,
uploadPreset: uploadPreset,
onSendProgress: onSendProgress,
onProgress: onProgress,
);
}

Expand Down

0 comments on commit 0a92e31

Please sign in to comment.