deleteSection method
Deletes a section.
- Parameters:
sectionId
: The id of the section that needs to be deleted.
- Returns a Future that completes when the section is deleted correctly.
Implementation
Future<void> deleteSection(int sectionId) async {
String apiName = 'api/sections/$sectionId';
var uri = Uri.https(manager.endpoint, apiName);
http.Response response = await http.delete(
uri,
headers: await manager.headers(),
);
MBManager.checkResponse(response.body, checkBody: false);
}