'How to send list of data to post api in flutter?
I want to send list of data to server using provider.How can i do using model class in flutter? i have created model class from https://app.quicktype.io. how to send data using model class of following json.
json model for sending data
{
"orderDto": {
"customerId": 0,
"customerUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"promoCodeId": 0,
"promoCodeUuid": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
},
"orderAddressDto": {
"orderAddressId": 0,
"orderAddressUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"orderId": 0
},
"orderDetailDtos": [
{
"productID": 0,
"productUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"productVariantId": 0,
"productVariantUUID": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
"quantity": 0,
"unitPrice": 0
}
]
}
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
