skip to Main Content

Debug vs Release
I created a flutter app and tested it on ios and android emulator and it’s working perfectly fine but when I published it to Google play store the ui is totally different and not working why is that?

I tried flutter pub clean, it didn’t work, I removed the unused dependencies and finally I manually added the apk file on my phone (I thought the problem was witb the aab)

2

Answers


  1. Chosen as BEST ANSWER

    I hade one dependency that wasn't compatible with android debug vs release

    now the app now works only on Samsung series A but on the other it doesn't work or only opens once and then I get the same problem


  2. the issue was caused by get package in the dimensions file I was using

    screenHeight = get.height; screenWidth = get.width;

    I changed it to material package

    I added this to the dimention package

    static void init(BuildContext context) {
    screenHeight = MediaQuery.of(context).size.height;
    screenWidth = MediaQuery.of(context).size.width;
    

    }

    and this in the main

    @override
    

    Widget build(BuildContext context) {
    Dimensions.init(context);

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search