updateBlock method
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,
);
}