I am attempting to implement the ability to upload multiple images (along with some other data) to an API using data entered via a form on my flutter application.
I am using https://pub.dev/packages/multi_image_picker which stores all the images as a List<Asset>
The API I am attempting to connect with says it requires the following fields.
firstname, lastname and images[].
I have started to encode the json body using:
var body = json.encode({"firstname": firstNameField, "lastname": lastNameField, "images": imageList});
but this failed. Does anyone have any suggestions?