uploadHeader method
Upload an image to be used as the header 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> uploadHeader(
{Uri? imagePath,
Uint8List? bytes,
required ImageFormat format}) async =>
await _uploadImage(imagePath, bytes, format, <String, String>{
_kUploadType: 'header',
});