Skip to content

Feature Request: Specific Aspect Ratio as "target" #93

@Eerey

Description

@Eerey

Hello there,
currently I use the plugin for my desktop app. It works very good, thanks for your efforts!
However, when it came down to a "target" aspect-ratio, I could not find any better Option than this (see code below).

Is there any hope for a "target aspect-ratio" for breakpoints that automatically scales with the scaleFactor?
In my example, "4/3" is my target aspect ratio" and depending on the window size it always gets correctly sized.

ResponsiveWrapper.builder(
    widget.child,
    minWidth: 1024,
    defaultScale: true,
    defaultScaleFactor: 1,
    defaultScaleLandscape: true,
    breakpoints: [
      ResponsiveBreakpoint.autoScale(
        1200,
        scaleFactor: (4 / 3) /
            MediaQuery.of(context).size.width /
            MediaQuery.of(context).size.height,
        name: MOBILE,
      ),
    ],

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