Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Orientation aware #2

Closed
radvansky-tomas opened this issue Apr 18, 2021 · 4 comments
Closed

Orientation aware #2

radvansky-tomas opened this issue Apr 18, 2021 · 4 comments

Comments

@radvansky-tomas
Copy link

I had to disable this bit to actually get correct width / height

  // Sets screen width and height
    // if (orientation == Orientation.portrait) {
    width = boxConstraints.maxWidth;
    height = boxConstraints.maxHeight;
    // } else {
    //   width = boxConstraints.maxHeight;
    //   height = boxConstraints.maxWidth;
    // }

AS far as I know then LayoutBuilder is orientation aware...ie width is always width and you should not artificially change it.

@CoderUni
Copy link
Owner

Thanks for bringing this up to me. The width and height parameters are used for calculating Adaptive.w and Adaptive.h. I've renamed both of them to adaptiveWidth and adaptiveHeight. This issue is now fixed in the latest version (^2.0.1). width and height parameters are now set with the correct width and height.

@radvansky-tomas
Copy link
Author

if anyone is interested in orientation aware sizer: https://pub.dev/packages/flutter_sizer/versions/1.0.0

@CoderUni
Copy link
Owner

CoderUni commented Apr 29, 2021

@radvansky-tomas Its a really good package. Congrats 🎉

Would it be ok to use some of your improvements in your package? I'm going to experiment with your .dp implementation. I'd like to try it out.

**Edit:
I noticed that you haven't update the right hand corner of your repo in the about page. It still says responsive_sizer

@radvansky-tomas
Copy link
Author

@CoderUni Of course ;) use what you can...I spent couple hours investigating good .dp option...best option would be to use less "magic" numbers...but I could not find proper documentation. Specially when you want to use is across all platforms.

PS. yep thx ,will try to update it with next release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants