|
|
|
@ -124,6 +124,8 @@ 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';
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -135,6 +137,8 @@ class AppSettings {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static File? updatedImage;
|
|
|
|
|
static String profilePictureUrl = '';
|
|
|
|
|
|
|
|
|
|
static String image='';
|
|
|
|
|
static var api = {
|
|
|
|
|
'signIn': host + '/login',
|
|
|
|
@ -158,7 +162,15 @@ class AppSettings {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static Future<String> 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;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
////request headers with content type
|
|
|
|
|
static Future<Map<String, String>> buildRequestHeaders() async {
|
|
|
|
|
Map<String, String> _headers = new Map<String, String>();
|
|
|
|
|