title: How to post a map of string and list with flutter
body: <p>I am trying to send a Map of string and list which is like:</p>
  
  <pre><code>Map&lt;String, List&lt;int&gt;&gt; results = {
    "tags": [5 , 10]
  }
  </code></pre>
  
  <pre><code>  Object headers = {
      HttpHeaders.authorizationHeader: "Bearer ${accessToken}",
      "Accept": "application/json",
    };
  </code></pre>
  
  <p>and I post that like this:</p>
  
  <pre><code>  post() {
      return http
          .post("$resource/$baseName/$id$query",
              headers: headers,
              body: results ,
              )
          .then((http.Response response) {
          return json.decode(response.body);
      }).catchError((err) {
        print(err);
      });
    }
  </code></pre>
  
  <p>and I got this error:</p>
  
  <pre><code>type 'List&lt;int&gt;' is not a subtype of type 'String' in type cast
  </code></pre>
  
  <p>also I guess that I should send </p>
  
  <pre><code>Map&lt;String,String&gt;
  </code></pre>
  
  <p>but I have </p>
  
  <pre><code>Map&lt;String, List&lt;int&gt;&gt;
  </code></pre>
  
  <p>I try many things but  am also new to flutter so I got confusing a lot 
  Thanks if someone can help me .
  EDIT:</p>
  
  <p>i try with dio</p>
  
  <pre><code>try {
        Response response =
            await Dio().post("$resource/$baseName/$id$query", data: {
          'tags': [1, 2]
        },
        options: Options(headers: headers)
        );
        print(response);
      } catch (e) {
        print(e);
      }
  </code></pre>