update method

Future<Map<String, dynamic>> update(
  1. String collection,
  2. String id,
  3. Map<String, dynamic> updates
)

Updates a document

Implementation

Future<Map<String, dynamic>> update(
  String collection,
  String id,
  Map<String, dynamic> updates,
) async {
  final response = await _client.put(
    Uri.parse('$baseUrl/collections/$collection/documents/$id'),
    headers: _headers,
    body: jsonEncode(updates),
  );

  return _handleResponse(response);
}