Skip to content

Commit 7dcf623

Browse files
author
李卓原
committed
update readme
1 parent ff74fb0 commit 7dcf623

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

lib/screenutil.dart

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ import 'dart:math';
1010
import 'package:flutter/material.dart';
1111

1212
class ScreenUtil {
13-
static const Size defaultSize = Size(1080, 1920);
13+
static const Size defaultSize = Size(360, 690);
1414
static late ScreenUtil _instance;
1515

16-
/// UI设计中手机尺寸 , px
17-
/// Size of the phone in UI Design , px
16+
/// UI设计中手机尺寸 , dp
17+
/// Size of the phone in UI Design , dp
1818
late Size uiSize;
1919

2020
/// 控制字体是否要根据系统的“字体大小”辅助选项来进行缩放。默认值为false。
@@ -108,9 +108,9 @@ class ScreenUtil {
108108
double radius(num r) => r * scaleText;
109109

110110
///字体大小适配方法
111-
///- [fontSize] UI设计上字体的大小,单位px.
111+
///- [fontSize] UI设计上字体的大小,单位dp.
112112
///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.
114114
///- [allowFontScaling]
115115
double setSp(num fontSize, {bool? allowFontScalingSelf}) =>
116116
allowFontScalingSelf == null

0 commit comments

Comments
 (0)