booleanbites / houzi-support

Support forum repo for issues & bugs reported for Houzi Flutter App.
4 stars 0 forks source link

some properties showing - no internet #49

Closed avitor12 closed 1 year ago

avitor12 commented 1 year ago

hi some of the properties from some reason going off and showing "no internet" what can be the reason? thanks

AdilSoomro commented 1 year ago

Since you don't want to tell your website publicly, Send your website address to our email: houziapp@gmail.com

avitor12 commented 1 year ago

aa ok

avitor12 commented 1 year ago

email send

avitor12 commented 1 year ago

can you help me please with the internet connection issue to properties going off? thanks

Hassan6197 commented 1 year ago

Hello @avitor12, Go to packages/houzi_package/lib/pages/property_details_page.dart and look for fetchAgencyInfo and fetchAgentInfo methods. In the methods comment the line isInternetConnected = false;.

Screenshot 2023-04-03 at 1 40 33 PM
avitor12 commented 1 year ago

Screenshot 2023-04-03 154958 that option is already was in false thanks

avitor12 commented 1 year ago

or do i need to change the second one also to "false" ? - or need change to "true" ? Screenshot 2023-04-03 154958

AdilSoomro commented 1 year ago

@avitor12 Hasan asked you to comment these lines. ie add two forward slashes in front of each line //

avitor12 commented 1 year ago

Future<List> fetchAgencyInfo(List list) async { _realtorInfoList.clear(); List tempList01 = list.map(int.parse).toList();

for(var element in tempList01){
  List<dynamic>? tempList = await _propertyBloc.fetchSingleAgencyInfoList(element);
  if(tempList == null || tempList.isEmpty || tempList[0] == null || tempList[0].runtimeType == Response){
  //  if(mounted){
  //    setState(() {
  //      isInternetConnected = false;
  //    });
  //  }
    break;
  }else {
    if (mounted) {
      setState(() {
        isInternetConnected = true;
        if(tempList.isNotEmpty){
          _realtorInfoList.add(tempList[0]);
        }
      });
    }
  }
}

same. some of the properties showing no internet

Hassan6197 commented 1 year ago

@avitor12 Look for BOTH fetchAgencyInfo and fetchAgentInfo methods and replace it with the following code:

Future<List<dynamic>> fetchAgencyInfo(List<String> list) async {
    _realtorInfoList.clear();
    List<int> tempList01 = list.map(int.parse).toList();

    for(var element in tempList01){
      List<dynamic>? tempList = await _propertyBloc.fetchSingleAgencyInfoList(element);
      if(tempList == null || tempList.isEmpty || tempList[0] == null || tempList[0].runtimeType == Response){
        // if(mounted){
        //   setState(() {
        //     isInternetConnected = false;
        //   });
        // }
        break;
      }else {
        if (mounted) {
          setState(() {
            isInternetConnected = true;
            if(tempList.isNotEmpty){
              _realtorInfoList.add(tempList[0]);
            }
          });
        }
      }
    }

    return _realtorInfoList;
  }

  Future<List<dynamic>> fetchAgentInfo(List<String> list) async {
    _realtorInfoList.clear();
    List<int> tempList01 = list.map(int.parse).toList();

    for (var element in tempList01) {
      List<dynamic>? tempList = [];
      tempList = await _propertyBloc.fetchSingleAgentInfoList(element);
      if(tempList == null || tempList.isEmpty || tempList[0] == null || tempList[0].runtimeType == Response){
        // if (mounted) {
        //   setState(() {
        //     isInternetConnected = false;
        //   });
        // }
        break;
      } else {
        if (mounted) {
          setState(() {
            isInternetConnected = true;
            if (tempList!.isNotEmpty) {
              _realtorInfoList.add(tempList[0]);
            }
          });
        }
      }
    }
    return _realtorInfoList;
  }
avitor12 commented 1 year ago

dear Hassan6197. you are awesome brother. thank you. works great. you can close this thread. all the best brother