updateBlock method

Future<Map<String, dynamic>> updateBlock(
  1. int hospitalId,
  2. int blockId,
  3. Map<String, dynamic> blockData
)

Updates an existing block's data within a hospital.

hospitalId The ID of the hospital. blockId The ID of the block to update. blockData A map containing the updated data for the block. Returns a Future<Map<String, dynamic>> containing the updated block's data.

Implementation

Future<Map<String, dynamic>> updateBlock(
    int hospitalId, int blockId, Map<String, dynamic> blockData) async {
  return await _makeRequest(
    '/api/hospitals/$hospitalId/blocks/$blockId/',
    method: 'PATCH',
    body: blockData,
  );
}