uploadStickerFile method
Use this method to upload a .png file with a sticker for later use in createNewStickerSet and addStickerToSet methods (can be used multiple times)
Returns the uploaded File on success.
Implementation
Future<File> uploadStickerFile(
int userId, io.File sticker, String stickerFormat) async {
var requestUrl = _apiUri('uploadStickerFile');
var body = <String, dynamic>{
'user_id': userId,
'sticker_format': stickerFormat,
};
var files = List<MultipartFile>.from([
MultipartFile('sticker', sticker.openRead(), sticker.lengthSync(),
filename: '${sticker.lengthSync()}')
]);
return File.fromJson(
await HttpClient.httpMultipartPost(requestUrl, files, body: body));
}