diff --git a/lib/dashboard.dart b/lib/dashboard.dart index e338f45..305c4c3 100644 --- a/lib/dashboard.dart +++ b/lib/dashboard.dart @@ -42,7 +42,7 @@ class _DashboardState extends State { Future uploadProfileApi(image) async { var payload = new Map(); - payload["picture"] = image.toString(); + payload["imagePath"] = image.toString(); var response1= await AppSettings.updateProfilePicture(payload); print(response1); diff --git a/lib/settings.dart b/lib/settings.dart index 7f1b445..9d000a8 100644 --- a/lib/settings.dart +++ b/lib/settings.dart @@ -124,11 +124,13 @@ class AppSettings { static String acceptRequestUrl = host +"friend-request/accept"; static String rejectRequestUrl = host +"friend-request/reject"; static String profilePicUrl = host + 'supplier/profile-picture'; - static String uploadPicUrl = host + 'uploads'; - static String profilePictureUrl = ''; + + + + @@ -233,25 +235,6 @@ class AppSettings { return false; } - - - static Future uploadImageHTTPNew(file) async { - - var request = http.MultipartRequest('POST', Uri.parse(uploadPicUrl + '/' + supplierId)); - request.files.add(await http.MultipartFile.fromPath('picture', file.path)); - var res = await request.send(); - var response = await http.Response.fromStream(res); - return response.body; - - } - - - - - - - - /*Apis Starts here*/ static Future login(payload) async {