I am working on a CRUD application. Problem : everything works perfectly when I debug my application on the emulator or physical device but when I create APK and run it on mobile all request works fine except post request.
As I search I have given internet permission already.
My post request
await http.post(
  Uri.parse('https://myap'),
  headers: {
    'Content-Type': 'application/json',
    'Accept': 'application/json',
    'Authorization': 'Bearer ${token}',
  },
  body: jsonBody,
).then(
  (response) {
    if (response.statusCode == 201) {
      navigatorKey.currentState?.pushNamed('home');
    }
 
  },
).catchError(
  (e) {
        print(e);
  },
);
Get function fine on apk, emulator, and physical devices.
 Future fetchFeed() async {
    await http.get(Uri.parse('https://myapi'), headers: {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Authorization': 'Bearer $token',
    }).then((response) {
      if (response.statusCode == 200) {
        print(response.statusCode);
      }
    }).catchError(
      (e) {
          print(e);
      },
    );
  }
 
     
     
    