uploadFormData abstract method
Uploads a file along with additional form data to the specified endpoint.
This method sends multipart/form-data to support file uploads.
Parameters:
endPoint
: The API endpoint to which the file and form data will be uploaded.params
: A map of additional key-value pairs to be included with the file upload.filePath
: The local file path of the file to be uploaded.headers
: A map of headers to include in the request.
Returns:
- A
Future
that resolves to aMap<String, dynamic>
representing the server's response.
Implementation
Future<Map<String, dynamic>> uploadFormData(
String endPoint,
Map<String, dynamic> params,
String filePath,
Map<String, dynamic> headers);