flare_splash_screen icon indicating copy to clipboard operation
flare_splash_screen copied to clipboard

Alignment is not working

Open draskosaric opened this issue 3 years ago • 1 comments

Hi, great library!

I set alignment to bottomCenter but it is aligned to the center of the screen. Here is the code:

  class MyApp extends StatelessWidget {
    // This widget is the root of your application.
    @override
    Widget build(BuildContext context) {
      return MaterialApp(
        title: 'Flutter Demo',
        home: WelcomeScreen(),
        theme: ThemeData(
          primarySwatch: Colors.blue,
          visualDensity: VisualDensity.adaptivePlatformDensity,
        ),
      );
    }
  }
  
  class WelcomeScreen extends StatefulWidget {
    @override
    _WelcomeScreenState createState() => _WelcomeScreenState();
  }
  
  class _WelcomeScreenState extends State<WelcomeScreen> {
    @override
    Widget build(BuildContext context) {
      var _size = MediaQuery.of(context).size;
      return SplashScreen.navigate(
        name: 'assets/intro.flr',
        next: (context) => MyHomePage(title: "Hey!"),
        startAnimation: 'intro',
        until: () => Future.delayed(Duration(seconds: 5)),
        alignment: Alignment.bottomCenter,
        width: _size.width,
        backgroundColor: Colors.black,
      );
    }
  }

This is the result: https://ibb.co/MsMRyYv

Am I doing something wrong here?

draskosaric avatar Sep 06 '20 10:09 draskosaric

This alignment is pass to the flare package, but I suppose it should apply to the container too, that might explain your result, I'll check more about this thanks for the report!

jaumard avatar Mar 05 '21 22:03 jaumard