ResponsiveFramework
ResponsiveFramework copied to clipboard
How to set the child if it comes from onGenerateRoute ?
I do not have access to the child parameter from the builder because it comes from the onGenerateRoute: onGenerateRoute
I found this BouncingScrollWrapper.builder(context, widget)
!
It works for mobiles, tablets and laptops!
builder: (context, widget) => ResponsiveWrapper.builder(
BouncingScrollWrapper.builder(context, widget),
maxWidth: 1200,
minWidth: 480,
defaultScale: true,
breakpoints: [
ResponsiveBreakpoint.resize(480, name: MOBILE),
ResponsiveBreakpoint.autoScale(800, name: TABLET),
ResponsiveBreakpoint.resize(1000, name: DESKTOP, scaleFactor: 1.2),
],
background: Container(color: Color(0xFFF5F5F5)),
),
I thought that UI looked too small on tablet simulator. Using scaleFactor allows to scale the UI for high resolution devices. I set it to 1.2 and everything seems to be well resized. What would be a good value for iPad simulator (is 1.0 good)?
The package works very well! Thanks!