ResponsiveFramework icon indicating copy to clipboard operation
ResponsiveFramework copied to clipboard

WillPopScope disabled

Open KochankovID opened this issue 4 years ago • 1 comments

builder: (context, widget) => ResponsiveWrapper.builder(
          const HomePage(),
          maxWidth: 1200,
          minWidth: 480,
          defaultScale: true,
          breakpoints: [
            const ResponsiveBreakpoint.resize(480, name: MOBILE),
            const ResponsiveBreakpoint.resize(800, name: TABLET),
            const ResponsiveBreakpoint.resize(1000, name: DESKTOP),
          ],
          background: Container(
            decoration:
                BoxDecoration(color: Theme.of(context).scaffoldBackgroundColor),
          ),
        ),

And HomePage() has WillPopScope as root children, but it doesn't work

KochankovID avatar Nov 09 '21 19:11 KochankovID

Okey, I solve it by changing builder to home:

 home: Builder(
            builder: (context) => ResponsiveWrapper.builder(
              const HomePage(),
              maxWidth: 1200,
              minWidth: 480,
              defaultScale: true,
              breakpoints: [
                const ResponsiveBreakpoint.resize(480, name: MOBILE),
                const ResponsiveBreakpoint.resize(800, name: TABLET),
                const ResponsiveBreakpoint.resize(1000, name: DESKTOP),
              ],
              background: Container(
                decoration: BoxDecoration(
                    color: Theme.of(context).scaffoldBackgroundColor),
              ),
            ),
          ));

WillPopScope was disabled cause builder property in MaterialApp is used to "inserting widgets above the Navigator".

I suppose you probably need to change the documentation :)

And also thank you for the awesome lib!! I love it :heart_on_fire:

KochankovID avatar Nov 09 '21 19:11 KochankovID