Advertisement
Guljahan

Untitled

Jun 18th, 2021 (edited)
213
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. Dio dio = new Dio();
  2. file.existsSync();
  3. String fileName = file.path.split('/').last;
  4. FormData formData = new FormData.fromMap({
  5. 'name' : nameController.text,
  6. 'email' : emailController.text,
  7. 'password' : passwordController.text,
  8. 'phone' : phoneController.text,
  9. 'isExpert': isExpert,
  10. 'location_id': _mySelection,
  11. "image": await MultipartFile.fromFile(file.path, filename: fileName)
  12. });
  13. var data = await dio.post("http://ipAddress", data: formData);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement