create method
Creates a new register on a specific endpoint.
Sends a POST request to create a new 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 tofalse.
Returns:
A Future that completes with the created object of type T.
Implementation
Future<Map<String, dynamic>> create(String endpoint, Map<String, dynamic> json, [bool isFormData = false]) async {
return _sendRequest('POST', endpoint, json, isFormData);
}