-
Notifications
You must be signed in to change notification settings - Fork 34
Open
Description
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,
),
),```
Metadata
Metadata
Assignees
Labels
No labels