uploadFormData abstract method

Future<Map<String, dynamic>> uploadFormData(
  1. String endPoint,
  2. Map<String, dynamic> params,
  3. String filePath,
  4. Map<String, dynamic> headers,
)

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 a Map<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);