uploadImage method

Future<ImageUploadResult> uploadImage({
  1. File? image,
  2. Uint8List? byteData,
  3. bool secureResource = true,
})

KO: 이미지 업로드하기
image에 이미지 파일 전달
secureResource로 이미지 URL을 HTTPS로 설정

EN: Upload image
Pass the image file to image
Set whether to use HTTPS for the image URL with secureResource

Implementation

Future<ImageUploadResult> uploadImage({
  File? image,
  Uint8List? byteData,
  bool secureResource = true,
}) async {
  if (image == null && byteData == null) {
    throw KakaoClientException(
      ClientErrorCause.badParameter,
      'Either parameter image or byteData must not be null.',
    );
  }
  return await api.uploadImage(image, byteData,
      secureResource: secureResource);
}