nylo-core / nylo

Nylo is the fastest way to build your next Flutter mobile app. Streamline your projects with Nylo's opinionated approach to building Flutter apps. Develop your next idea ⚡️
https://nylo.dev
MIT License
597 stars 61 forks source link

smooth page transition #120

Closed a0v0 closed 6 months ago

a0v0 commented 7 months ago

I'm striving to achieve iOS-like smooth page transitions in my Flutter app. While the page_transition package provides detailed control over animations through curves, Nylo (built on page_transition) lacks this customization. Is there a way to expose page_transition's curves in Nylo or explore alternative navigation methods to maintain smooth transitions?

Also see: https://stackoverflow.com/questions/56026568/how-to-achieve-ios-like-smooth-page-transition-animation-in-flutter

agordn52 commented 6 months ago

Hi @a0v0,

You can modify the page transition settings by passing the pageTransitionSettings parameter into the routeTo helper. Here's an example.

routeTo(HomePage.path, pageTransitionSettings: PageTransitionSettings(
                 duration: Duration(seconds: 1),
                 curve: Curves.easeInOutCubic,
                  alignment: Alignment.topCenter,
                  fullscreenDialog: true,
                  isIos: true,
                  opaque: true,
                  inheritTheme: true,
                  childCurrent: context.widget,
                  context: context,
));

Let's continue this discussion in the discussions tab because it's not necessarily an issue in the Nylo framework but a query, thanks.