title: How can i send the Map Object in multipart request in flutter
body: <p>Here I am trying to send the Object Map in the multipart request but my request is going as a string, not in JSON format please suggest me to do correct request. Thanks in advance.</p>
  
  <p>I have tried the multipart request but my request should be in correct form..</p>
  
  <pre><code>var getApiUrl = 'http://malik-env-test.ap-south-1.elasticbeanstalk.com/webapi/post/create';
  
    Map userData = {
  
      "creator": {
        "creatorId": "298",
        "createDate": "2018-12-21 20:44:45.8"
      },
      "info": "$campusInfo",
      "title": "$eventName",
      "postCampusId": "5642"
  
    };
  
  </code></pre>
  
  <pre><code>Uri uri = Uri.parse(getApiUrl);
     http.MultipartRequest request = new http.MultipartRequest('POST', uri);
     request.fields['creator'] = userData['creator'];
     request.fields['info'] = '$campusInfo';
     request.fields['title'] = '$eventName';
     request.fields['postCampusId'] = '5642';
     request.files.add(await http.MultipartFile.fromPath('image_file1', imagePath, contentType: new MediaType('application', 'x-tar')));
  //   var body = json.encode(request);
     print(request);
     http.StreamedResponse response = await request.send();
     String jsonData = response.toString();
     print(jsonData);ddd
  </code></pre>