Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dio dio = new Dio();
- file.existsSync();
- String fileName = file.path.split('/').last;
- FormData formData = new FormData.fromMap({
- 'name' : nameController.text,
- 'email' : emailController.text,
- 'password' : passwordController.text,
- 'phone' : phoneController.text,
- 'isExpert': isExpert,
- 'location_id': _mySelection,
- "image": await MultipartFile.fromFile(file.path, filename: fileName)
- });
- var data = await dio.post("http://ipAddress", data: formData);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement