uploadPresentation method

Future<ContentId> uploadPresentation(
  1. Signed<Presentation> presentation
)

Implementation

Future<ContentId> uploadPresentation(
  Signed<Presentation> presentation,
) async {
  final resp =
      await post('/presentation', json.encode(presentation.toJson()));

  if (resp.statusCode == HttpStatus.accepted) {
    return UploadPresentationResponse.fromJson(json.decode(resp.body))
        .contentId;
  }

  return Future.error(HttpResponseError(resp.statusCode, resp.body));
}