ResponsiveFramework
ResponsiveFramework copied to clipboard
isMobile always false, name is null
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
"
You might have caught an edge case here.
Looks like if a breakpoint is set to minWidth, then the minWidth overrides the breakpoint name?
I have no idea. How can i solve this problem and should how should I set it up?
Let me check the tests and see what's going one. Meanwhile, you can change the mobile breakpoint from 450 to 451 px.