clean-code-dev / animated_splash_screen

The easiest way to create your animated splash screen in a fully customizable way.
MIT License
114 stars 26 forks source link

My Custom Widget for the Splash Does not fill the entire screen. #39

Open shillow opened 2 years ago

shillow commented 2 years ago

My custom widget for the splash: of this library does not fill the entire screen, and I get pixel overlay error. Can somebody help me out??

Orlyga01 commented 2 years ago

same here - and trying to use PageTransition results in: _AssertionError ('package:page_transition/src/page_transition.dart': Failed assertion: line 179 pos 24: 'alignment != null': When using type "size" transition you need argument: 'alignment' )

mbaka-bilal commented 2 years ago

The solution is to set the splashIconSize property: splashIconSize: double.infinity, Example:

AnimatedSplashScreen.withScreenFunction(
      splashIconSize: double.infinity,
      splash:  Stack(
            children: [
              Align(
                alignment: Alignment.center,
                child: SizedBox(
                    width: 150,
                    height: 150,
                    child: Image.asset("assets/images/logo.png")),
              ),
              Align(
                alignment: Alignment.bottomCenter,
                child: Column(
                  mainAxisSize: MainAxisSize.min,
                  children: [
                    Text(
                      "Ekaites Kitchen",
                      style: Theme.of(context).textTheme.bodyText1,
                    ),
                    const SizedBox(
                      height: 10,
                    ),
                    CircularProgressIndicator(
                      color: Theme.of(context).primaryColor,
                    )
                  ],
                ),
              )
            ],
          ),
          screenFunction: () async {
                return const Home();
            },
        )