uploadThumbnail method

dynamic uploadThumbnail()

Implementation

uploadThumbnail() {
  Api.createDefaultParams((parameter) {
    parameter.set("file", File(thumbnail!));
    Api api = Api(context2: context);
    api.setErrorListener((s) {
      isLoading = false;
      setState(() {});
      Ui(context).errorAlert(message: s.errMessage);
    });
    api.execute(Config.uploadPhotoTempMethod!, SellonMethod.post, parameter,
        (response) {
      checkAgain(thumbnailUrl: response.data()['data']['url']);
    });
  });
}