title: Flutter http headers
body: <p>The <code>post</code> request is throwing an error while setting the header map.</p>
  <p>Here is my code</p>
  <pre><code>Future&lt;GenericResponse&gt; makePostCall(
    GenericRequest genericRequest) {String URL = &quot;$BASE_URL/api/&quot;;
  
  Map data = {
    &quot;name&quot;: &quot;name&quot;,
    &quot;email&quot;: &quot;email&quot;,
    &quot;mobile&quot;: &quot;mobile&quot;,
    &quot;transportationRequired&quot;: false,
    &quot;userId&quot;: 5,
  };
  
  Map userHeader = {&quot;Content-type&quot;: &quot;application/json&quot;, &quot;Accept&quot;: &quot;application/json&quot;};
  
  
  return _netUtil.post(URL, body: data, headers:userHeader).then((dynamic res) {
    print(res);
    if (res[&quot;code&quot;] != 200) throw new Exception(res[&quot;message&quot;][0]);
    return GenericResponse.fromJson(res);
  });
  
  }
  </code></pre>
  <p>but I'm getting this exception with headers.</p>
  <pre><code>══╡ EXCEPTION CAUGHT BY GESTURE ╞═
  flutter: The following assertion was thrown while handling a gesture:
  flutter: type '_InternalLinkedHashMap&lt;dynamic, dynamic&gt;' is not a subtype of type 'Map&lt;String, String&gt;'
  flutter:
  flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
  flutter: more information in this error message to help you determine and fix the underlying cause.
  flutter: In either case, please report this assertion by filing a bug on GitHub:
  flutter:   https://github.com/flutter/flutter/issues/new?template=BUG.md
  flutter:
  flutter: When the exception was thrown, this was the stack:
  flutter: #0      NetworkUtil.post1 (package:saranam/network/network_util.dart:50:41)
  flutter: #1      RestDatasource.bookPandit (package:saranam/network/rest_data_source.dart:204:21)
  </code></pre>
  <p>Anybody facing this issue? I didn't find any clue with the above log.</p>