Skip to content

Commit f9908fb

Browse files
author
李卓原
committed
5.0.0-nullsafety.8
1 parent df0c80c commit f9908fb

File tree

4 files changed

+12
-5
lines changed

4 files changed

+12
-5
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# 5.0.0-nullsafety.8
2+
- merge v4
3+
- Add a method to get the screen orientation
14

25
# 5.0.0-nullsafety.7
36
- fix #221

lib/screen_util.dart

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,12 @@ class ScreenUtil {
125125
///Font size adaptation method
126126
///- [fontSize] The size of the font on the UI design, in dp.
127127
///- [allowFontScaling]
128-
double setSp(num fontSize, {bool? allowFontScalingSelf}) => allowFontScalingSelf == null
129-
? (allowFontScaling ? (fontSize * scaleText) * _textScaleFactor : (fontSize * scaleText))
130-
: (allowFontScalingSelf ? (fontSize * scaleText) * _textScaleFactor : (fontSize * scaleText));
128+
double setSp(num fontSize, {bool? allowFontScalingSelf}) =>
129+
allowFontScalingSelf == null
130+
? (allowFontScaling
131+
? (fontSize * scaleText) * _textScaleFactor
132+
: (fontSize * scaleText))
133+
: (allowFontScalingSelf
134+
? (fontSize * scaleText) * _textScaleFactor
135+
: (fontSize * scaleText));
131136
}

lib/screenutil_init.dart

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import 'package:flutter/material.dart';
22
import 'package:flutter_screenutil/screen_util.dart';
33

4-
54
class ScreenUtilInit extends StatelessWidget {
65
/// A helper widget that initializes [ScreenUtil]
76
ScreenUtilInit({

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_screenutil
22
description: A flutter plugin for adapting screen and font size.Guaranteed to look good on different models
3-
version: 5.0.0-nullsafety.7
3+
version: 5.0.0-nullsafety.8
44
homepage: https://github.com/OpenFlutter/flutter_screenutil
55

66
environment:

0 commit comments

Comments
 (0)