李卓原

fix #297 5.0.1+2

# 5.0.1+2
- Text adaptation no longer considers the height of the screen
# 5.0.1+1
- split default value change to false
# 5.0.1
- support for split screen
- add number.sm (return min(number.sp , number))
# 5.0.0+2
- update readme
# 5.0.0+1
- update readme
# 5.0.0
-Breaking change. Use a new way to set font scaling
-Deprecated ssp and nsp
-Breaking change. Use a new way to set font scaling -Deprecated ssp and nsp
# 5.0.0-nullsafety.11
- revert 5.0.0-nullsafety.10
- fix #230
# 5.0.0-nullsafety.10
- fix #228
# 5.0.0-nullsafety.9
- Supplementary documentation, supports two initialization methods
# 5.0.0-nullsafety.8
- merge v4
- Add a method to get the screen orientation
# 5.0.0-nullsafety.7
- fix #221
# 5.0.0-nullsafety.6
- merge #216 #218
# 5.0.0-nullsafety.5
- Optimize initialization method
# 5.0.0-nullsafety.4
- merge #205
# 5.0.0-nullsafety.3
- merge 4.0.2+3
# 5.0.0-nullsafety.2
- merge 4.0.2+2 #186
# 5.0.0-nullsafety.1
- merge 4.0.1 ,4.0.2 #183
# 5.0.0-nullsafety.0
- Migrated flutter_screenutil to non-nullable
# 4.0.2
- add r(),adapt according to the smaller of width or height
# 4.0.1
- Modify the initialization unit to dp
- delete screenWidthPx and screenHeightPx(No one use these method,I guess)
# 4.0.0
- update to 4.0.0
# 4.0.0-beta3
- Optimize the way of initialization
# 4.0.0-beta2
- fix error:'window is not a type.'
# 4.0.0-beta1
- change readme
# 4.0.0-beta
- Modified the initialization method
- Support font adaptation in themedata
# 3.2.0
- Modify the method name to be more semantic: wp->sw , hp->sh
- Remove the restriction of flutter version
- Modify the return type num to double
# 3.1.1
- change readme
# 3.1.0
- Use the way back to v2 version
- Modify registration method
# 3.0.2+1
- Guide users to use V2 version
# 3.0.2
- Change the unit of'statusBarHeight' and 'bottomBarHeight' to dp
# 3.0.1
- update readme
# 3.0.0
- After a period of experimentation, I think it's time to release the official version
# 3.0.0-beta.2
- readme update
# 3.0.0-beta.1
**BREAKING CHANGES**
- `BuildContext` is no more required while initializing. i.e. ScreenUtil.init(~~context~~)
- Initialize size of design draft using `designSize` instead of width & height.
- All the static methods are now member methods.
# 2.3.1
- add textStyle Example.
# 2.3.0
- We still need context to initialize, sorry.
# 2.2.0
- add 'wp','hp'. Get the height/width of the screen proportionally
- For example: 0.5.wp : Half the width of the screen.
# 2.1.0
- add 'nsp' , you can use 'fontSize: 24.nsp' instead of 'fontSize: ScreenUtil().setSp(24, allowFontScalingSelf: false)'
- add 'nsp' , you can use 'fontSize: 24.nsp' instead of 'fontSize: ScreenUtil().setSp(24,
allowFontScalingSelf: false)'
# 2.0.0
- Use `MediaQueryData.fromWindow(window)` instead of `MediaQuery.of(context)`, no context parameter required
- Use `MediaQueryData.fromWindow(window)` instead of `MediaQuery.of(context)`, no context parameter
required
- API changes, please note
# 1.1.0
- support ExtensionMethod Dart-SDK-2.6.0
- you can use 'width: 50.w' instead of 'width: ScreenUtil().setWidth(50)'
'50.h' instead of 'ScreenUtil().setHeight(50)'
... ... @@ -131,18 +179,20 @@
'24.ssp' instead of 'ScreenUtil().setSp(24, allowFontScalingSelf: true)'
# 1.0.2
- fix #89
- 优化屏幕旋转效果
- 字体适配统一使用宽度
# 1.0.1
- Rebuild code, change API
Delete "getInstance()", please use "ScreenUtil ()" instead of "ScreenUtil.getInstance()"
use "ScreenUtil().setSp(24, allowFontScalingSelf: true)" instead of "ScreenUtil.getInstance().setSp(14, true)"
- Rebuild code, change API Delete "getInstance()", please use "ScreenUtil ()" instead of "
ScreenUtil.getInstance()"
use "ScreenUtil().setSp(24, allowFontScalingSelf: true)" instead of "ScreenUtil.getInstance()
.setSp(14, true)"
- Modify the initialization method
- Fix #68
- Change example code
Example CompileSdkVersion change to 28
- Change example code Example CompileSdkVersion change to 28
**If there is significant impact, please return to 0.7.0**
... ... @@ -174,7 +224,8 @@
- Fix the wrong way of using
- It is recommended to use `ScreenUtil.getInstance()` instead of `ScreenUtil()` , for example: `ScreenUtil.getInstance().setHeight(25)` instead of `ScreenUtil().setHeight(25)`
- It is recommended to use `ScreenUtil.getInstance()` instead of `ScreenUtil()` , for
example: `ScreenUtil.getInstance().setHeight(25)` instead of `ScreenUtil().setHeight(25)`
# 0.4.4
... ... @@ -184,9 +235,9 @@
- Modify the font to change with the system zoom mode. The default value is false.
- setSp(int fontSize, [allowFontScaling = false]) => allowFontScaling
? setWidth(fontSize) \* \_textScaleFactor
: setWidth(fontSize);
- setSp(int fontSize, [allowFontScaling = false]) => allowFontScaling ? setWidth(fontSize) \*
\_textScaleFactor
: setWidth(fontSize);
# 0.4.2
... ... @@ -210,9 +261,10 @@
# 0.3.1
- Perfect documentation
- Width is enlarged relative to the design draft => The ratio of font and width to the size of the design
- Height is enlarged relative to the design draft => The ratio of height width to the size of the design
- Width is enlarged relative to the design draft => The ratio of font and width to the size of the
design
- Height is enlarged relative to the design draft => The ratio of height width to the size of the
design
# 0.3.0
... ...
# flutter_screenutil
[![pub package](https://img.shields.io/pub/v/flutter_screenutil.svg)](https://pub.dev/packages/flutter_screenutil)
[![pub points](https://badges.bar/flutter_screenutil/pub%20points)](https://pub.dev/packages/flutter_screenutil/score)
[![popularity](https://badges.bar/flutter_screenutil/popularity)](https://pub.dev/packages/flutter_screenutil/score)
**A flutter plugin for adapting screen and font size.Let your UI display a reasonable layout on different screen sizes!**
... ...
# flutter_screenUtil
# flutter_screenutil
[![pub package](https://img.shields.io/pub/v/flutter_screenutil.svg)](https://pub.dartlang.org/packages/flutter_screenutil)
[![pub points](https://badges.bar/flutter_screenutil/pub%20points)](https://pub.dev/packages/flutter_screenutil/score)
[![popularity](https://badges.bar/flutter_screenutil/popularity)](https://pub.dev/packages/flutter_screenutil/score)
**flutter 屏幕适配方案,让你的UI在不同尺寸的屏幕上都能显示合理的布局!**
... ...
# I don’t speak Portuguese, and other developers have translated the first version. I later modified it based on the translation software. It is recommended to read the English/Chinese version.
# flutter_screenutil
[![pub package](https://img.shields.io/pub/v/flutter_screenutil.svg)](https://pub.dartlang.org/packages/flutter_screenutil)
[![pub points](https://badges.bar/flutter_screenutil/pub%20points)](https://pub.dev/packages/flutter_screenutil/score)
[![popularity](https://badges.bar/flutter_screenutil/popularity)](https://pub.dev/packages/flutter_screenutil/score)
**Um plugin Flutter para adaptação de tamanho de tela e fontes. Deixe sua UI exibir um layout aceitável em diferentes tamanhos de tela!**
... ...
... ... @@ -9,6 +9,7 @@ class MyApp extends StatelessWidget {
//Set the fit size (fill in the screen size of the device in the design) If the design is based on the size of the iPhone6 ​​(iPhone6 ​​750*1334)
return ScreenUtilInit(
designSize: Size(360, 690),
splitScreenMode: true,
builder: () => MaterialApp(
debugShowCheckedModeBanner: false,
title: 'Flutter_ScreenUtil',
... ... @@ -97,6 +98,7 @@ class _HomePageState extends State<HomePage> {
),
),
),
TextField(style: TextStyle(fontSize: 180.sp)),
Text('Device width:${ScreenUtil().screenWidth}dp'),
Text('Device height:${ScreenUtil().screenHeight}dp'),
Text('Device pixel density:${ScreenUtil().pixelRatio}'),
... ... @@ -148,7 +150,8 @@ class _HomePageState extends State<HomePage> {
print('Bottom safe zone distance dp:${ScreenUtil().bottomBarHeight}dp');
print('Status bar height dp:${ScreenUtil().statusBarHeight}dp');
print('The ratio of actual width to UI design:${ScreenUtil().scaleWidth}');
print('The ratio of actual height to UI design:${ScreenUtil().scaleHeight}');
print(
'The ratio of actual height to UI design:${ScreenUtil().scaleHeight}');
print('System font scaling:${ScreenUtil().textScaleFactor}');
print('0.5 times the screen width:${0.5.sw}dp');
print('0.5 times the screen height:${0.5.sh}dp');
... ...
... ... @@ -84,7 +84,7 @@ class ScreenUtil {
/// /// The ratio of actual height to UI design
double get scaleHeight => _screenHeight / uiSize.height;
double get scaleText => min(scaleWidth, scaleHeight);
double get scaleText => scaleWidth;
/// 根据UI设计的设备宽度适配
/// 高度也可以根据这个来做适配可以保证不变形,比如你想要一个正方形的时候.
... ...
name: flutter_screenutil
description: A flutter plugin for adapting screen and font size.Guaranteed to look good on different models
version: 5.0.1
version: 5.0.1+2
homepage: https://github.com/OpenFlutter/flutter_screenutil
environment:
... ...