route to new page
garlicgit opened this issue · 2 comments
garlicgit commented
I seem to lose the nice animation when I route to a new page, even of the new page is using the same global instance of the curved navigation bar. The icon highlighted/elevated changes, but it is a sudden change rather than the nice animation. I am using Sailor, but I suspect with other experiments I have done, it is not specific to how I route to a new page. Is there a technique for maintaining the animation when moving to a new page?
uitlaber commented
solved this
import 'dart:async';
...
if (_page == 1) {
Future.delayed(Duration(milliseconds: 540), () {
Navigator.of(context).pushNamed('Search');
});
}
...
rafalbednarczuk commented
If you want to keep the state of CurvedNavigationBar
while navigation you must put MaterialApp
inside CurvedNavigationBar