GithubHelp home page GithubHelp logo

Comments (9)

radvansky-tomas avatar radvansky-tomas commented on June 3, 2024 1

Feel free to test my fork, I will check your calculations too, as that sp/dp implementation was real pain to implement

from responsive_sizer.

titoworlddev avatar titoworlddev commented on June 3, 2024 1

@CoderUni thanks for paying attention to the requests that improves the package a lot. If you have time to notify here when it is updated, it would be appreciated so I will implement it in my application.

from responsive_sizer.

CoderUni avatar CoderUni commented on June 3, 2024

Since there are more people who wanted .w and .h extensions to reflect the actual width and height of the device regardless of the orientation, I'll be changing the way this package works. For the sp implementation, I would be using @radvansky-tomas's implementation which can be found in this fork. I'll be updating the package once I have more time to work on it. Thanks for filing this issue.

from responsive_sizer.

CoderUni avatar CoderUni commented on June 3, 2024

@radvansky-tomas Could you create a PR?

from responsive_sizer.

zxl777 avatar zxl777 commented on June 3, 2024
print("w=${100.w} h=${100.h}");
w=768.0 h=1024.0

This value is the same regardless of the rotation angle of the iPad.

But what I expected is that the bottom side is width.

Can you change it?

from responsive_sizer.

CoderUni avatar CoderUni commented on June 3, 2024

@zxl777 @Hekhy I've updated the package to v3.0.1. Did it fix your issue?

from responsive_sizer.

zxl777 avatar zxl777 commented on June 3, 2024

Thank you, I have tested the 3.01 example, and this problem has been solved perfectly.

There are two suggestions:

  1. Update the document to explain the description of Device.height and so on.
  2. Can be added in the example
Text(
             "w=${100.w} h=${100.h}",
             style: TextStyle(fontSize: 12.sp), // or Adaptive.sp(12)
           ),

In this way, we can intuitively understand the attributes of w and h.

from responsive_sizer.

CoderUni avatar CoderUni commented on June 3, 2024

Thanks for the suggestions @zxl777, I've added the explanation in the docs a few days ago and I've just added the code snippet you've provided in the example.

from responsive_sizer.

zxl777 avatar zxl777 commented on June 3, 2024

Awesome 👏

from responsive_sizer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.