getUserPackageList method

Future getUserPackageList()

Implementation

Future getUserPackageList() async {
  var decodedResponse;
  try {
    final response = await http.get(
      Uri.parse('${SDK_BASE_URL}api/home_index/get_user_package'),
      headers: {'Authorization': SignUpController.currentUserToken},
    );
    decodedResponse = json.decode(response.body);
    packageNameList = decodedResponse['user_package'];
  } catch (e) {
    errorListner(
        apiname: 'api/home_index/get_user_package',
        responsed: "${decodedResponse}",
        request: '',
        app_error: '${e}');
  }
}