'Why flutter only showing WHITE SCREEN in release mode

I have no idea what's going on, No errors has been thrown in Debug Mode (it works and render fine) However, after running futter run --release the home screen is not showing only white screen

This is my main.dart file, I'm using GetX as route tool main.dart

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return GetMaterialApp(
      title: 'Sample App',
      theme: ThemeData(
        backgroundColor: Colors.white,
        primarySwatch: Colors.grey,
      ),
      //defaultTransition: Transition.zoom,
      home: const Login(),
      getPages: [
        GetPage(name: "/login", page: () => const Login()),
        GetPage(name: "/register", page: () => const Register()),
      ],
    );
  }
}

This is my login.dart login.dart

Scaffold(
      resizeToAvoidBottomInset: false,
      backgroundColor: Colors.white,
      body: Container(
          width: Get.width,
          margin: kDefaultBodyMargin,
          child: Column(
            crossAxisAlignment: CrossAxisAlignment.start,
            children: [
              const Spacer(),
              Container(
                margin: const EdgeInsets.only(top: 30.0),
                child: TextField(),
              ),
              Container(
                margin: const EdgeInsets.only(top: 30.0),
                child: TextField(),
              ),
              const Spacer(flex: 5),
              Container(
                margin: EdgeInsets.only(bottom: Get.height * 0.05),
                child: SizedBox(
                  width: Get.width,
                  height: 54,
                  child: TexButton(),
                )
              ),
            ],
          ),
        ),
      )

pubspec.yaml

dependencies:
  flutter:
    sdk: flutter
    
  badges: ^2.0.2
  circular_profile_avatar: ^2.0.5
  date_time_picker: "^2.1.0"
  dio: ^4.0.4
  dotted_border: ^2.0.0+2
  get: ^4.6.1
  google_fonts: ^2.3.1
  extended_masked_text: ^2.3.1
  flutter_vector_icons: ^1.0.0
  flutter_phone_direct_caller: ^2.1.0
  jiffy: ^5.0.0
  loading_indicator: ^3.0.3
  shared_preferences: ^2.0.13
  
  cupertino_icons: ^1.0.2


Solution 1:[1]

please check this link , it's kind of similar question

Flutter app show White screen in release app mode?

and also check the internet permission in android manifest

like this

enter image description here

Solution 2:[2]

because of the GetX package -> GetMaritalApp you used, I faced that problem today and tried all day long to solve it.

tried to downgrade the version of Get package put didn't work, so I simply get rid of it, not simply actually that took me time.

and BTW tried all solutions in https://github.com/flutter/flutter/issues/70558

Hope that helped, and Hope they will fix it soon.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Jinto Joseph
Solution 2