如何使用 flutter 中的原始数据使用 Dio 创建 http post?

How make a http post with Dio using data raw in flutter?

我正在尝试执行 dio post 请求,我需要将正文指定为原始数据 Post

Response response = await (await init()).post(url, data: {
        "token": token,
        "code": formol}
        );

尝试将其编码为 Json:

var json =  {
  "code": "xxxxxxxxx",
  "token": "-------------",
}; 
...
Response response = await _dio.post(url,
  options: Options(headers: {
    HttpHeaders.contentTypeHeader: "application/json",
  }),
  data: jsonEncode(json),
);