Skip to content

Landscape mode and responsive framework #38

@prateekmedia

Description

@prateekmedia

Intro

This framework works flawlessly for small screen devices, but when you turn your device into landscape mode the situation also becomes upside down.

The Problem

Although this is able to hand my approximately 450x850 mobile, but when I turn it in landscape mode then all the ui elements are too big and some are even overflowing cause of the less dpi in small screen but that's not the case in portrait mode.

You can also try this on the recreated flutter website, when you turn your phone with any resolution into landscape mode then everything becomes too big to handle event the bottomNavigationBar also doesnt respect the small screen.

It seems like it doesn't respect nor recognize small screens in landscape mode cause it thinks that the width is higher so that is true in landscape but it should also consider that the height is low in landscape mode cause the resolution becomes 850x450(in my small screen case)

Suggestion / Possible Solution

Give us the option to specify other properties for landscape mode or by default respect landscape mode cause even if the width is high in it but the height is very low in that mode, or it should understand landscape mode by itself by checking the aspect ratio which is my case is approx 2:1 in landscape mode.

Enough Talk, Show me your code

This is the code of my builder inside MaterialApp

builder: (context, widget) => ResponsiveWrapper.builder(
  BouncingScrollWrapper.builder(context, widget),
  minWidth: 450,
  defaultScale: true,
  breakpoints: [
    ResponsiveBreakpoint.resize(500, name: MOBILE),
    ResponsiveBreakpoint.autoScale(800, name: TABLET),
    ResponsiveBreakpoint.autoScale(1000, name: TABLET),
    ResponsiveBreakpoint.resize(1200, name: DESKTOP),
    ResponsiveBreakpoint.autoScale(2460, name: "4K"),
  ],
),

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