Skip to content

How to set the child if it comes from onGenerateRoute ? #51

@postpasspost

Description

@postpasspost

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions