ResponsiveFramework icon indicating copy to clipboard operation
ResponsiveFramework copied to clipboard

isMobile always false, name is null

Open malikdoksoz opened this issue 2 years ago • 3 comments

Device: iPhone 7 Plus Flutter: 2.10.5

builder: (context, myWidget) {
        myWidget = DevicePreview.appBuilder(context, myWidget);
        myWidget = ResponsiveWrapper.builder(
          BouncingScrollWrapper.builder(context, myWidget),
          maxWidth: 1200,
          minWidth: 450,
          defaultScale: true,
          breakpoints: [
            const ResponsiveBreakpoint.resize(450, name: MOBILE),
            const ResponsiveBreakpoint.autoScale(800,
                name: MOBILE, scaleFactor: 1.1),
            const ResponsiveBreakpoint.autoScale(1000,
                name: TABLET, scaleFactor: 1.35),
            const ResponsiveBreakpoint.resize(1200, name: DESKTOP),
            // const ResponsiveBreakpoint.autoScale(2460, name: "4K"),
          ],
        );
        return myWidget;
      }
  I called "ResponsiveWrapper.of(context).activeBreakpoint"

returned Ekran Resmi 2022-04-22 12 36 04 "

malikdoksoz avatar Apr 22 '22 09:04 malikdoksoz

You might have caught an edge case here.

Looks like if a breakpoint is set to minWidth, then the minWidth overrides the breakpoint name?

rayliverified avatar May 18 '22 20:05 rayliverified

I have no idea. How can i solve this problem and should how should I set it up?

malikdoksoz avatar May 18 '22 20:05 malikdoksoz

Let me check the tests and see what's going one. Meanwhile, you can change the mobile breakpoint from 450 to 451 px.

rayliverified avatar May 18 '22 23:05 rayliverified