Toggle navigation
Toggle navigation
This project
Loading...
Sign in
flutter_package
/
flutter_screenutil
Go to a project
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation pinning
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
李卓原
2021-01-29 18:44:17 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
7dcf623db92cad441bd8cf07394c17784d2fb048
7dcf623d
1 parent
ff74fb01
update readme
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
lib/screenutil.dart
lib/screenutil.dart
View file @
7dcf623
...
...
@@ -10,11 +10,11 @@ import 'dart:math';
import
'package:flutter/material.dart'
;
class
ScreenUtil
{
static
const
Size
defaultSize
=
Size
(
1080
,
192
0
);
static
const
Size
defaultSize
=
Size
(
360
,
69
0
);
static
late
ScreenUtil
_instance
;
/// UI设计中手机尺寸 , px
/// Size of the phone in UI Design , px
/// UI设计中手机尺寸 , dp
/// Size of the phone in UI Design , dp
late
Size
uiSize
;
/// 控制字体是否要根据系统的“字体大小”辅助选项来进行缩放。默认值为false。
...
...
@@ -108,9 +108,9 @@ class ScreenUtil {
double
radius
(
num
r
)
=>
r
*
scaleText
;
///字体大小适配方法
///- [fontSize] UI设计上字体的大小,单位
px
.
///- [fontSize] UI设计上字体的大小,单位
dp
.
///Font size adaptation method
///- [fontSize] The size of the font on the UI design, in
px
.
///- [fontSize] The size of the font on the UI design, in
dp
.
///- [allowFontScaling]
double
setSp
(
num
fontSize
,
{
bool
?
allowFontScalingSelf
})
=>
allowFontScalingSelf
==
null
...
...
Please
register
or
login
to post a comment