To delete existing content you need to first prepare the DeleteContentRequest payload by importing it.
import 'package:dialogue_wise/DTOs/delete_content_request.dart';
Next you need to prepare the payload
var request = new DeleteContentRequest();
request.slug = '<Provide Slug>';
request.accessToken = '<Provide access token>';
request.contentId = "<Provide content id>";
request.source = '<Provide a source name>';
contentId is the Id of the content you need to delete and source can be any text and allows you to identify the source of the content that deleted the content.
Once the payload is ready, just call the deleteContent method.
var dialogueWiseService = new DialoguewiseService();
var response = await dialogueWiseService.deleteContent(request);
That’s it! You will now get a response which will indicate if your content was deleted successfully.
For mode details on the implementation, please have a look at the examples available on Github.
Please note, the changes will make the Dialogue as a draft version. You will need to deploy your Dialogue for it to be available. To understand further, please have a look at Deploying your Dialogue.