Comments (9)
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.
@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.
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.
@radvansky-tomas Could you create a PR?
from responsive_sizer.
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.
@zxl777 @Hekhy I've updated the package to v3.0.1. Did it fix your issue?
from responsive_sizer.
Thank you, I have tested the 3.01 example, and this problem has been solved perfectly.
There are two suggestions:
- Update the document to explain the description of Device.height and so on.
- 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.
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.
Awesome 👏
from responsive_sizer.
Related Issues (20)
- Sizes do not appear to be updating correctly on Windows maximise or restore using WidgetsBindingObserver HOT 1
- ../../../development/tools/flutter/.pub-cache/hosted/pub.dartlang.org/responsive_sizer-3.0.6+1/lib/src/helper.dart:56:33: Warning: Operand of null-aware operation '!' has type 'WidgetsBinding' which excludes null. HOT 3
- App doesn't run correctly when I compile it to Android HOT 12
- Add Desktop ScreenType HOT 5
- two ResponsiveSizer HOT 2
- Sp and Dp way different than with sizer and are not interchangable HOT 7
- Error using any method HOT 1
- Does not reload the screen when the device changes from Portrait to Landscape HOT 2
- The Device Class variables apsectRatio, width, and height all Resize when Textfieldforms are used. HOT 2
- unfocus in flutter 3.10 HOT 1
- Changing the device text size setting affects the outputted UI. HOT 3
- ScreenType.desktop Issue HOT 4
- How to use responsive_sizer to achieve a responsive design using a Figma design with a specified phone frame? HOT 2
- Responsive sizer stops working properly, resizing issues HOT 2
- Is this keep maintained and work with flutter 3.20? HOT 1
- Undefined name 'View'. HOT 2
- error when use pixel 4 or 5 HOT 2
- Sizes are not updating when rotating the device HOT 2
- The package rebuild the widget tree when using it with go router HOT 2
- The package doesn't work when using const constructors for widgets HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from responsive_sizer.