李卓原

update readme

@@ -10,11 +10,11 @@ import 'dart:math'; @@ -10,11 +10,11 @@ import 'dart:math';
10 import 'package:flutter/material.dart'; 10 import 'package:flutter/material.dart';
11 11
12 class ScreenUtil { 12 class ScreenUtil {
13 - static const Size defaultSize = Size(1080, 1920); 13 + static const Size defaultSize = Size(360, 690);
14 static late ScreenUtil _instance; 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 late Size uiSize; 18 late Size uiSize;
19 19
20 /// 控制字体是否要根据系统的“字体大小”辅助选项来进行缩放。默认值为false。 20 /// 控制字体是否要根据系统的“字体大小”辅助选项来进行缩放。默认值为false。
@@ -108,9 +108,9 @@ class ScreenUtil { @@ -108,9 +108,9 @@ class ScreenUtil {
108 double radius(num r) => r * scaleText; 108 double radius(num r) => r * scaleText;
109 109
110 ///字体大小适配方法 110 ///字体大小适配方法
111 - ///- [fontSize] UI设计上字体的大小,单位px. 111 + ///- [fontSize] UI设计上字体的大小,单位dp.
112 ///Font size adaptation method 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 ///- [allowFontScaling] 114 ///- [allowFontScaling]
115 double setSp(num fontSize, {bool? allowFontScalingSelf}) => 115 double setSp(num fontSize, {bool? allowFontScalingSelf}) =>
116 allowFontScalingSelf == null 116 allowFontScalingSelf == null