How to send complex model with files in flutter via chopper to spring

162 views Asked by At

Assume we are creating a social network site. I try to send a model that contains multiple comments each comment could contain multiple files.

MainModel

List<Comment> comments;
String uid;
.... //other properties here

Comment class should look like:

String comment;
List<http.MultipartFile> attachments;
... other data of comment

The question is: How to send this MainModel via flutter (chopper lib) and receive it in spring boot.

I saw threads where people just send a simple file with flutter to spring boot, but never seen threads where people send complex model with multiple files

0

There are 0 answers