ResponsiveFramework
ResponsiveFramework copied to clipboard
Feature Request: Specific Aspect Ratio as "target"
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,
),
],
I would also like to see this. I am evaluating what package I can use instead of ScreenUtil and this seemed promissing until I realised that it can only be bound to the width of the screen and not to the height which can be solved by this aspect ratio approach.