FilledStacks / responsive_builder

A set of widgets to make responsive UI building in flutter more readable
MIT License
497 stars 80 forks source link

add orientation info #8

Open mukhtarfauzi opened 4 years ago

mukhtarfauzi commented 4 years ago

why there is no orientation info in these packages?

FilledStacks commented 4 years ago

I removed the orientation so replace it with the orientation builder to keep those responsibilities separate. I wanted to make use of the already existing orientation widget to provide that functionality.

There was also a bug with the orientation from the media query where it would sometimes report the old orientation.

basnetjiten commented 2 years ago

OrientationBuilder does not builds upon orientation change in Ipad simulator. Is the issue with media query still remains?

ScreenTypeLayout(
  breakpoints:
      const ScreenBreakpoints(desktop: 900, tablet: 650, watch: 250),
  mobile: OrientationLayoutBuilder(

      portrait: (context) => const ProgramPortraitView(),
      landscape: (context) => const ProgramLandscapeView()),
  desktop
    : OrientationLayoutBuilder(
      portrait: (context) => const ProgramPortraitView(),
      landscape: (context) => const ProgramLandscapeView()),
)
FilledStacks commented 2 years ago

@basnetjiten I think so. I can't be certain. This works for us.