deleteSection method

Future<void> deleteSection(
  1. int sectionId
)

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);
}