Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alignment is not working #29

Open
draskosaric opened this issue Sep 6, 2020 · 1 comment
Open

Alignment is not working #29

draskosaric opened this issue Sep 6, 2020 · 1 comment

Comments

@draskosaric
Copy link

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?

@jaumard
Copy link
Owner

jaumard commented Mar 5, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants