diff --git a/README.md b/README.md index f75021c..018d559 100644 --- a/README.md +++ b/README.md @@ -60,12 +60,12 @@ ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true); ### Use: -#### API +### API ```dart - ScreenUtil().setWidth(540) (sdk>=2.6 : 540.w) //Adapted to screen width + ScreenUtil().setWidth(540) (sdk>=2.6 : 540.w) //Adapted to screen width ScreenUtil().setHeight(200) (sdk>=2.6 : 200.h) //Adapted to screen height - ScreenUtil().setSp(24) (sdk>=2.6 : 24.sp) //Adapter font + ScreenUtil().setSp(24) (sdk>=2.6 : 24.sp) //Adapter font ScreenUtil().setSp(24, allowFontScalingSelf: true) (sdk>=2.6 : 24.ssp) //Adapter font(fonts will scale to respect Text Size accessibility settings) ScreenUtil.pixelRatio //Device pixel density diff --git a/README_CN.md b/README_CN.md index d245e9e..5f67236 100644 --- a/README_CN.md +++ b/README_CN.md @@ -64,12 +64,12 @@ ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true); ### 使用 -#### API +### API ```dart - ScreenUtil().setWidth(540) (sdk>=2.6 : 540.w) //根据屏幕宽度适配尺寸 + ScreenUtil().setWidth(540) (sdk>=2.6 : 540.w) //根据屏幕宽度适配尺寸 ScreenUtil().setHeight(200) (sdk>=2.6 : 200.h) //根据屏幕高度适配尺寸 - ScreenUtil().setSp(24) (sdk>=2.6 : 24.sp) //适配字体 + ScreenUtil().setSp(24) (sdk>=2.6 : 24.sp) //适配字体 ScreenUtil().setSp(24, allowFontScalingSelf: true) (sdk>=2.6 : 24.ssp) //适配字体(根据系统的“字体大小”辅助选项来进行缩放) ScreenUtil.pixelRatio //设备的像素密度 diff --git a/README_PT.md b/README_PT.md index 94bb06f..d7aef1d 100644 --- a/README_PT.md +++ b/README_PT.md @@ -60,12 +60,12 @@ ScreenUtil.init(context, width: 750, height: 1334, allowFontScaling: true); ### Uso: -#### API +### API ```dart - ScreenUtil().setWidth(540) (sdk>=2.6 : 540.w) //Adapted to screen width + ScreenUtil().setWidth(540) (sdk>=2.6 : 540.w) //Adapted to screen width ScreenUtil().setHeight(200) (sdk>=2.6 : 200.h) //Adapted to screen height - ScreenUtil().setSp(24) (sdk>=2.6 : 24.sp) //Adapter font + ScreenUtil().setSp(24) (sdk>=2.6 : 24.sp) //Adapter font ScreenUtil().setSp(24, allowFontScalingSelf: true) (sdk>=2.6 : 24.ssp) //Adapter font(fonts will scale to respect Text Size accessibility settings) ScreenUtil.pixelRatio //Device pixel density