Merge pull request #139 from WDI-Ideas/coflicts22aug
conflict solved for page refresh in communkty details page if iser go…
This commit is contained in:
@@ -19,13 +19,19 @@ class _CommunitySettingState extends State<CommunitySetting> {
|
||||
int communityid = Get.arguments['communityid'];
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
return WillPopScope(
|
||||
onWillPop: () async{
|
||||
Get.back(result: true);
|
||||
return true;
|
||||
},
|
||||
child: Scaffold(
|
||||
// key: _scaffoldKey1,
|
||||
backgroundColor: Color(0xFF222935),
|
||||
extendBody: true,
|
||||
resizeToAvoidBottomInset: false,
|
||||
appBar: CommonAppbar(
|
||||
titleTxt: "Community settings",
|
||||
customBack: true,
|
||||
),
|
||||
body: Stack(children: [
|
||||
Container(
|
||||
@@ -69,7 +75,8 @@ class _CommunitySettingState extends State<CommunitySetting> {
|
||||
child: rowTile(text: 'Manage interest')),
|
||||
sizedBoxHeight(20.h),
|
||||
])
|
||||
]));
|
||||
])),
|
||||
);
|
||||
}
|
||||
|
||||
Widget rowTile({
|
||||
|
||||
@@ -47,6 +47,12 @@ class _CommunityDetailsState extends State<CommunityDetails> {
|
||||
super.initState();
|
||||
}
|
||||
|
||||
|
||||
void refreshData() {
|
||||
setState(() {
|
||||
myfuture = CommunityDetail().getCommunityDetail(CommunityId);
|
||||
});}
|
||||
|
||||
pinunpinCommunity(String communitypinid) async {
|
||||
// utils.loader();
|
||||
Map<String, dynamic> updata = {
|
||||
@@ -217,10 +223,19 @@ class _CommunityDetailsState extends State<CommunityDetails> {
|
||||
),
|
||||
const PopupMenuDivider(),
|
||||
PopupMenuItem(
|
||||
onTap: () {
|
||||
Get.toNamed(RouteName.communitysetting, arguments: {
|
||||
onTap: () async {
|
||||
var result = await Get.toNamed(
|
||||
RouteName.communitysetting,
|
||||
arguments: {
|
||||
'communityid': CommunityId,
|
||||
});
|
||||
if (result != null && result) {
|
||||
refreshData();
|
||||
// CommunityDetail().getCommunityDetail(CommunityId);
|
||||
print("Updating community details...");
|
||||
// setState(() {});
|
||||
|
||||
}
|
||||
},
|
||||
child: Padding(
|
||||
padding: EdgeInsets.symmetric(horizontal: 8.w),
|
||||
|
||||
Reference in New Issue
Block a user