File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -10,11 +10,11 @@ import 'dart:math';
10
10
import 'package:flutter/material.dart' ;
11
11
12
12
class ScreenUtil {
13
- static const Size defaultSize = Size (1080 , 1920 );
13
+ static const Size defaultSize = Size (360 , 690 );
14
14
static late ScreenUtil _instance;
15
15
16
- /// UI设计中手机尺寸 , px
17
- /// Size of the phone in UI Design , px
16
+ /// UI设计中手机尺寸 , dp
17
+ /// Size of the phone in UI Design , dp
18
18
late Size uiSize;
19
19
20
20
/// 控制字体是否要根据系统的“字体大小”辅助选项来进行缩放。默认值为false。
@@ -108,9 +108,9 @@ class ScreenUtil {
108
108
double radius (num r) => r * scaleText;
109
109
110
110
///字体大小适配方法
111
- ///- [fontSize] UI设计上字体的大小,单位px .
111
+ ///- [fontSize] UI设计上字体的大小,单位dp .
112
112
///Font size adaptation method
113
- ///- [fontSize] The size of the font on the UI design, in px .
113
+ ///- [fontSize] The size of the font on the UI design, in dp .
114
114
///- [allowFontScaling]
115
115
double setSp (num fontSize, {bool ? allowFontScalingSelf}) =>
116
116
allowFontScalingSelf == null
You can’t perform that action at this time.
0 commit comments