Comments (2)
@rrifafauzikomara we make an extension like this to work with sizes in the mockup
extension DoubleExt on double {
static const standardWidth = 1440.0;
static const standardHeight = 1010.0;
double textSize() {
return this * MediaQuery.of(Get.context).size.width / standardWidth;
}
double width() {
return (this / standardWidth * 100).w;
}
double height() {
return (this / standardHeight * 100).h;
}
}
from sizer.
@rrifafauzikomara we make an extension like this to work with sizes in the mockup
extension DoubleExt on double { static const standardWidth = 1440.0; static const standardHeight = 1010.0; double textSize() { return this * MediaQuery.of(Get.context).size.width / standardWidth; } double width() { return (this / standardWidth * 100).w; } double height() { return (this / standardHeight * 100).h; } }
Can you show how to use it and where should I put this extension method.
from sizer.
Related Issues (20)
- Blank White Page with GetMaterialApp HOT 2
- Different values on the same page? HOT 1
- README HOT 1
- Unverified uploader on pub.dev
- Getting white screen in release app when i am using sizer along with blocProvider HOT 2
- How Sizer knows the height and width of the screen, is it based on px or dp?
- Please add iconSize and radius
- LateError (LateInitializationError: Field 'width' has not been initialized.) HOT 3
- Font size problem HOT 1
- Orientation
- .h is not working in windows
- Is this project alive or not active? HOT 3
- : Error: The getter 'h' isn't defined for the class 'int'.
- font size is not accurate
- Dear please update this package for flutter 3.10 please
- Assignment of variables is not supported
- The method 'ResponsiveSizer' isn't defined for the type 'MyApp HOT 3
- Create Flutter Release Build To Many Type Size not Support To Using Sizer
- update for flutter 3.13 please HOT 1
- Sizer not working with routes
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 sizer.