profile image change improvement

main_design2.0
Sikander Saleem 2 years ago
parent 7e15a266b1
commit e98bd62be9

@ -88,7 +88,7 @@ class AllRequestsProvider extends ChangeNotifier {
try {
Map<String, dynamic> body = {
"typeTransaction": [1, 2, 3, 4],
"statusTransaction": [1, 2, 3],
"statusTransaction": [1, 2, 3,4],
"priority": [0, 1],
"displayData": [],
"from": from.toIso8601String(),
@ -120,7 +120,7 @@ class AllRequestsProvider extends ChangeNotifier {
try {
Map<String, dynamic> body = {
"typeTransaction": [1, 2, 3, 4],
"statusTransaction": [1, 2, 3],
"statusTransaction": [1, 2, 3,4],
"priority": [1],
"displayData": []
};
@ -149,7 +149,7 @@ class AllRequestsProvider extends ChangeNotifier {
try {
Map<String, dynamic> body = {
"typeTransaction": [1, 2, 3, 4],
"statusTransaction": [1, 2, 3],
"statusTransaction": [1, 2, 3,4],
"priority": [],
"displayData": [1]
};

@ -128,6 +128,9 @@ class UserProvider extends ChangeNotifier {
response = await ApiManager.instance.post(URLs.updateProfileImage, body: body);
if (response.statusCode >= 200 && response.statusCode < 300) {
profileImage = image;
String imageId = jsonDecode(response.body)["data"];
_user.profilePhotoName = URLs.getFileUrl(imageId);
ApiManager.instance.user = _user;
}
_loading = false;
notifyListeners();

@ -111,7 +111,8 @@ class _ProfilePageState extends State<ProfilePage> {
);
if (croppedFile != null) {
snapshot.uploadProfileImage(_user.userID, File(croppedFile.path));
await snapshot.uploadProfileImage(_user.userID, File(croppedFile.path));
Provider.of<SettingProvider>(context,listen: false).setUser(_userProvider.user);
}
}
}),

Loading…
Cancel
Save