I have this code:

var header = {
      "Content-Type": 'multipart/form-data',
      "Accept": 'application/json'
    };

    final id = storage.read(key: 'idUser');
    Map<String, String> data = {'id': id, 'name': name};

    var pic = await http.MultipartFile.fromPath("file", image!.path);

    var request = http.MultipartRequest(
        "POST", Uri.parse(ServerUrl.baseUri + "/signal/addSignal"))
      ..fields.addAll(data)
      ..headers.addAll(header);

    request.files.add(pic);

    var streamResponse = await request.send();
    var response = await http.Response.fromStream(streamResponse);
    print(response);

    if (response.statusCode == 200) {
      print(response);
      Loader.hide();
    } else {
      //error
    }

but i can't get it to work.

the image is uploaded correctly but I cannot enter any more data on my server.