Skip to content

Commit 8662d61

Browse files
authored
Add missing await in doc (#323)
`http.MultipartFile.fromPath` returns a `Future`.
1 parent cdde7b0 commit 8662d61

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/src/multipart_request.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ final _newlineRegExp = RegExp(r'\r\n|\r|\n');
2525
/// var uri = Uri.parse('https://example.com/create');
2626
/// var request = http.MultipartRequest('POST', uri)
2727
/// ..fields['user'] = '[email protected]'
28-
/// ..files.add(http.MultipartFile.fromPath(
28+
/// ..files.add(await http.MultipartFile.fromPath(
2929
/// 'package', 'build/package.tar.gz',
3030
/// contentType: MediaType('application', 'x-tar')));
3131
/// var response = await request.send();

0 commit comments

Comments
 (0)