I have a "modelCharacteristics" object that contains modelHeight, modelWeight, and modelSize objects. How do I insert a JSON object to dio's FormData to post it?
I tried to do it like in Postman but that does not work.
var formData = dio.FormData.fromMap({
'category': categoryId,
'name': name,
'price': int.parse(price),
'color': color,
'size': sizes,
'description': description,
'material': material,
'countryProducer': countryProducer,
"style": style,
"countInStock": int.parse(countInStock),
"modelCharacteristics[modelHeight]": modelCharacteristics.modelHeight.toInt(),
"modelCharacteristics[modelWeight]": modelCharacteristics.modelWeight.toInt(),
"modelCharacteristics[modelSize]": modelCharacteristics.modelSize,)}