Showing
3 changed files
with
9 additions
and
9 deletions
| @@ -60,12 +60,12 @@ ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true); | @@ -60,12 +60,12 @@ ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true); | ||
| 60 | 60 | ||
| 61 | ### Use: | 61 | ### Use: |
| 62 | 62 | ||
| 63 | -#### API | 63 | +### API |
| 64 | 64 | ||
| 65 | ```dart | 65 | ```dart |
| 66 | - ScreenUtil().setWidth(540) (sdk>=2.6 : 540.w) //Adapted to screen width | 66 | + ScreenUtil().setWidth(540) (sdk>=2.6 : 540.w) //Adapted to screen width |
| 67 | ScreenUtil().setHeight(200) (sdk>=2.6 : 200.h) //Adapted to screen height | 67 | ScreenUtil().setHeight(200) (sdk>=2.6 : 200.h) //Adapted to screen height |
| 68 | - ScreenUtil().setSp(24) (sdk>=2.6 : 24.sp) //Adapter font | 68 | + ScreenUtil().setSp(24) (sdk>=2.6 : 24.sp) //Adapter font |
| 69 | ScreenUtil().setSp(24, allowFontScalingSelf: true) (sdk>=2.6 : 24.ssp) //Adapter font(fonts will scale to respect Text Size accessibility settings) | 69 | ScreenUtil().setSp(24, allowFontScalingSelf: true) (sdk>=2.6 : 24.ssp) //Adapter font(fonts will scale to respect Text Size accessibility settings) |
| 70 | 70 | ||
| 71 | ScreenUtil.pixelRatio //Device pixel density | 71 | ScreenUtil.pixelRatio //Device pixel density |
| @@ -64,12 +64,12 @@ ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true); | @@ -64,12 +64,12 @@ ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true); | ||
| 64 | 64 | ||
| 65 | ### 使用 | 65 | ### 使用 |
| 66 | 66 | ||
| 67 | -#### API | 67 | +### API |
| 68 | 68 | ||
| 69 | ```dart | 69 | ```dart |
| 70 | - ScreenUtil().setWidth(540) (sdk>=2.6 : 540.w) //根据屏幕宽度适配尺寸 | 70 | + ScreenUtil().setWidth(540) (sdk>=2.6 : 540.w) //根据屏幕宽度适配尺寸 |
| 71 | ScreenUtil().setHeight(200) (sdk>=2.6 : 200.h) //根据屏幕高度适配尺寸 | 71 | ScreenUtil().setHeight(200) (sdk>=2.6 : 200.h) //根据屏幕高度适配尺寸 |
| 72 | - ScreenUtil().setSp(24) (sdk>=2.6 : 24.sp) //适配字体 | 72 | + ScreenUtil().setSp(24) (sdk>=2.6 : 24.sp) //适配字体 |
| 73 | ScreenUtil().setSp(24, allowFontScalingSelf: true) (sdk>=2.6 : 24.ssp) //适配字体(根据系统的“字体大小”辅助选项来进行缩放) | 73 | ScreenUtil().setSp(24, allowFontScalingSelf: true) (sdk>=2.6 : 24.ssp) //适配字体(根据系统的“字体大小”辅助选项来进行缩放) |
| 74 | 74 | ||
| 75 | ScreenUtil.pixelRatio //设备的像素密度 | 75 | ScreenUtil.pixelRatio //设备的像素密度 |
| @@ -60,12 +60,12 @@ ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true); | @@ -60,12 +60,12 @@ ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true); | ||
| 60 | 60 | ||
| 61 | ### Uso: | 61 | ### Uso: |
| 62 | 62 | ||
| 63 | -#### API | 63 | +### API |
| 64 | 64 | ||
| 65 | ```dart | 65 | ```dart |
| 66 | - ScreenUtil().setWidth(540) (sdk>=2.6 : 540.w) //Adapted to screen width | 66 | + ScreenUtil().setWidth(540) (sdk>=2.6 : 540.w) //Adapted to screen width |
| 67 | ScreenUtil().setHeight(200) (sdk>=2.6 : 200.h) //Adapted to screen height | 67 | ScreenUtil().setHeight(200) (sdk>=2.6 : 200.h) //Adapted to screen height |
| 68 | - ScreenUtil().setSp(24) (sdk>=2.6 : 24.sp) //Adapter font | 68 | + ScreenUtil().setSp(24) (sdk>=2.6 : 24.sp) //Adapter font |
| 69 | ScreenUtil().setSp(24, allowFontScalingSelf: true) (sdk>=2.6 : 24.ssp) //Adapter font(fonts will scale to respect Text Size accessibility settings) | 69 | ScreenUtil().setSp(24, allowFontScalingSelf: true) (sdk>=2.6 : 24.ssp) //Adapter font(fonts will scale to respect Text Size accessibility settings) |
| 70 | 70 | ||
| 71 | ScreenUtil.pixelRatio //Device pixel density | 71 | ScreenUtil.pixelRatio //Device pixel density |
-
Please register or login to post a comment