requests
requests copied to clipboard
Requests not Working on 4g
My flutter app is working good on all android versions except greater than 10 while using mobile data, I checked it on Samsung A71 having android 13 and it worked on both wifi and 4g but the same apk is not working on other mobiles like pocco/oppo having android version greater than 10, I am using http in my url.
Here is my code
Future<dynamic> requestDataFromNetwork( {String urlFile, dynamic body, BuildContext context}) async { var response; var baseURL = '${Globals.baseUrl}/$urlFile'; try { response = await Requests.post(baseURL, body: body, timeoutSeconds: 30, persistCookies: true); return response.body.toString(); } catch (e) { return response = ''; } }
This is my dependency: requests: ^4.7.0