dust blog
Keep Multipart Uploads in the API Contract

Flutter apps often need to send files, not only fetch data.
Multipart upload code can spread quickly. One screen builds FormData. Another screen repeats the same field names. Later, the API changes one key.
Dust HTTP keeps that shape in the API contract.
Use @MultiPart() on the endpoint. Use @Part(...) for each text field or file.
The generated Dio client builds the request from the method signature.
The app code stays focused on the action: choose the file, call the upload method, handle the result.
Useful when upload fields should be reviewed beside the endpoint, not hidden inside widget code.
Read the Dust HTTP request bodies guide.
#Dust #HTTPClient #Flutter #Dart #CodeGeneration
