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

Exit animations not working with PageRouteBuilder #14

Open
rlch opened this issue Jul 19, 2019 · 1 comment
Open

Exit animations not working with PageRouteBuilder #14

rlch opened this issue Jul 19, 2019 · 1 comment

Comments

@rlch
Copy link

rlch commented Jul 19, 2019

Hi,

I'm using PageRouteBuilder to push a widget with villain animations. The entrance animations work fine, however when i use Navigator.of(context).pop(), the exit animations don't appear.

Here's the push:

                  listenerContext,
                  PageRouteBuilder(
                      pageBuilder: (listenerContext, _, __) => RestScreen(
                            rest: state.rest,
                            workoutArea: widget.workoutArea,
                          ))).then((result) => result
                  ? _workoutBloc.dispatch(FinishWorkoutStep())
                  : print("closed"));```

and pop + villain animations (part of RestScreen):
```              Villain(
                villainAnimation: VillainAnimation.fade(
                    from: Duration(milliseconds: 0),
                    to: Duration(milliseconds: 1000),
                    fadeFrom: 0,
                    fadeTo: 1,
                    curve: Curves.linear),
                animateExit: true,
                animateEntrance: true,
                child: AppBar(
                  elevation: 0.0,
                  centerTitle: true,
                  title: Text(
                    widget.rest.title,
                    style: AppTheme.heading,
                  ),
                  leading: Padding(
                    padding: const EdgeInsets.only(left: 16),
                    child: IconButton(
                      iconSize: 40,
                      icon: Icon(Icons.close),
                      color: Colors.white.withOpacity(0.9),
                      onPressed: () {
                        Navigator.of(context).pop(false);
                      },
                    ),
                  ),
                  backgroundColor: Colors.transparent,
                ),
              ),```
@vinitkadam
Copy link

I am facing the same issue. Did you find any workaround?

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