uploadImage function
upload image with form data
Implementation
Future uploadImage(BuildContext context,
{FormData? formData, Function? onProgress}) async {
Htify clo = Htify.clourage();
return await clo
.sendFile(context, '${routes['uploadImage']}', formData ?? FormData(),
onProgress: (int sent, int total) {
if (onProgress is Function) {
onProgress(sent, total);
}
});
}