update method

Future<Map<String, dynamic>> update(
  1. String endpoint,
  2. Map<String, dynamic> json, [
  3. bool isFormData = false
])

Updates a register on a specific endpoint.

Sends a PUT request to update a register on the specified endpoint.

Parameters:

  • endpoint: The API endpoint to send the request to.
  • json: The data to save.
  • isFormData: Optional. Whether to send the data as form data or JSON. Defaults to false.

Returns:

A Future that completes with the updated object of type T.

Implementation

Future<Map<String, dynamic>> update(String endpoint, Map<String, dynamic> json, [bool isFormData = false]) async {
  return _sendRequest('PUT', endpoint, json, isFormData);
}