uploadMobileIcon method

Future<Uri> uploadMobileIcon({
  1. Uri? imagePath,
  2. Uint8List? bytes,
  3. required ImageFormat format,
})

Upload an image to be used as the mobile icon image for the Subreddit.

imagePath is the path to a JPEG or PNG image. This path must be local and accessible from disk. Will result in an UnsupportedError if provided in a web application.

bytes is a list of bytes representing an image.

format is the format of the image defined by bytes.

On success, the Uri for the uploaded image is returned. On failure, DRAWImageUploadException is thrown.

Implementation

Future<Uri> uploadMobileIcon(
        {Uri? imagePath,
        Uint8List? bytes,
        required ImageFormat format}) async =>
    await _uploadImage(imagePath, bytes, format, <String, String>{
      _kUploadType: 'icon',
    });