uploadImage static method

Future<String> uploadImage(
  1. dynamic pickedFile, {
  2. bool crop = false,
})

Implementation

static Future<String> uploadImage(pickedFile, {bool crop = false}) async {
  if (pickedFile == null) {
    return '';
  }
  if (crop) {
    var cropImg = await cropImage(pickedFile);
    return cropImg;
  } else {
    var image = await OssHelper.upload(file: File(pickedFile.path));
    return image;
  }
}