Created
April 5, 2025 22:03
-
-
Save allansrc/e1443c9edbd4ad052ff6c21df7fd7269 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
requestPostWithFile() async { | |
final file = File('path'); | |
final formDataRequestObject = FormData.fromMap({"objeto": "address"}); | |
formDataRequestObject.files.add( | |
MapEntry('files', await MultipartFile.fromFile(file)), | |
); | |
final response = await Dio().post(URI, data: formDataRequestObject); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment