unBlock method
dynamic
unBlock(
- ProfileDetails item
Implementation
unBlock(ProfileDetails item) {
Helper.showAlert(
message: "Unblock ${getName(item)}?",
actions: [
TextButton(
onPressed: () {
Get.back();
},
child: const Text("NO", style: TextStyle(color: buttonBgColor))),
TextButton(
onPressed: () async {
if (await AppUtils.isNetConnected()) {
Get.back();
if (context.mounted) Helper.progressLoading(context: context);
Mirrorfly.unblockUser(
userJid: item.jid.checkNull(),
flyCallBack: (FlyResponse response) {
Helper.hideLoading(context: context);
if (response.isSuccess && response.hasData) {
toToast("${getName(item)} has been Unblocked");
userUpdatedHisProfile(item.jid.checkNull());
}
});
} else {
toToast(Constants.noInternetConnection);
}
},
child: const Text("YES", style: TextStyle(color: buttonBgColor))),
],
context: context);
}