We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5365100 commit 99c24ddCopy full SHA for 99c24dd
lib/src/screen_util.dart
@@ -207,6 +207,12 @@ class ScreenUtil {
207
///Adapt according to the smaller of width or height
208
double radius(num r) => r * min(scaleWidth, scaleHeight);
209
210
+ /// Adapt according to the both width and height
211
+ double diagonal(num d) => d * scaleHeight * scaleWidth;
212
+
213
+ /// Adapt according to the maximum value of scale width and scale height
214
+ double diameter(num d) => d * max(scaleWidth, scaleHeight);
215
216
///字体大小适配方法
217
///- [fontSize] UI设计上字体的大小,单位dp.
218
///Font size adaptation method
0 commit comments