Codelessly / ResponsiveFramework

Easily make Flutter apps responsive. Automatically adapt UI to different screen sizes. Responsiveness made simple. Demo: https://gallery.codelessly.com/flutterwebsites/minimal/
https://codelessly.com
MIT License
1.26k stars 150 forks source link

maxWidth and page navigation animation (flutter web 2 & 3) #105

Closed knbmedia closed 2 years ago

knbmedia commented 2 years ago

Hi In my Flutter Web application I set the max width of my app to 800 pixels.

builder: (context, widget) => ResponsiveWrapper.builder(
          ClampingScrollWrapper.builder(context, widget!),
          maxWidth: 800,
          minWidth: 600,
          defaultScale: true,
          breakpoints: [
            ResponsiveBreakpoint.resize(480, name: MOBILE),
            ResponsiveBreakpoint.autoScale(800, name: TABLET),
            ResponsiveBreakpoint.resize(1000, name: DESKTOP),
          ],
          background: Container(color: Color(0xFFccF5F5))),

But when pushing new page, the default slide transition start (or end when back) outside this limit:

transition

To reproduce, juste create a default flutter project, use this package with maxWidth and navigate to a second page.

Regards

rayliverified commented 2 years ago

I recommend overriding the mobile swipe transition for Flutter Web. Please see the example in the examples folder for overriding the navigator transition.

rayliverified commented 2 years ago

Closing issue with the above solution. Feel free to reopen.