1

I am using CupertinoTabScaffold in my flutter app. I can open page with particular item on the first tab and remove it from the second one. Page with removed item can't be opened, so I call Navigator.of(context).pop from this page in Redux Store callback. This works but the problem is I see animation when I open first tab (it starts at the moment when I click on this tab). How can I make Navigator.of(context).pop without animation?

Could someone help me? Any help is appreciated!

1 Answers1

0

If you want to disable transition animation when navigating between page when pushing just wrap it in PageRouteBuilder

Navigator.of(context).push(PageRouteBuilder(
              pageBuilder: (context, _, __) {
                return Page();
              },
            )); 

That will disable both enter and exit transition.

You can read more about the subject here https://medium.com/flutter-community/everything-you-need-to-know-about-flutter-page-route-transition-9ef5c1b32823

Filip P.
  • 1,194
  • 1
  • 7
  • 18
  • I need pages to change with animation when this tab is active and without animation when It's not – Евгений Стёпин Nov 04 '19 at 21:48
  • Then you need implement enter transition by yourself and don't do transition animation on exit. You can read more how to do that here https://stackoverflow.com/questions/52762069/flutter-transition-exit – Filip P. Nov 04 '19 at 22:01