Skip to content

Commit

Permalink
5.0.0-nullsafety.8
Browse files Browse the repository at this point in the history
  • Loading branch information
李卓原 committed Mar 11, 2021
1 parent df0c80c commit f9908fb
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# 5.0.0-nullsafety.8
- merge v4
- Add a method to get the screen orientation

# 5.0.0-nullsafety.7
- fix #221
Expand Down
11 changes: 8 additions & 3 deletions lib/screen_util.dart
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,12 @@ class ScreenUtil {
///Font size adaptation method
///- [fontSize] The size of the font on the UI design, in dp.
///- [allowFontScaling]
double setSp(num fontSize, {bool? allowFontScalingSelf}) => allowFontScalingSelf == null
? (allowFontScaling ? (fontSize * scaleText) * _textScaleFactor : (fontSize * scaleText))
: (allowFontScalingSelf ? (fontSize * scaleText) * _textScaleFactor : (fontSize * scaleText));
double setSp(num fontSize, {bool? allowFontScalingSelf}) =>
allowFontScalingSelf == null
? (allowFontScaling
? (fontSize * scaleText) * _textScaleFactor
: (fontSize * scaleText))
: (allowFontScalingSelf
? (fontSize * scaleText) * _textScaleFactor
: (fontSize * scaleText));
}
1 change: 0 additions & 1 deletion lib/screenutil_init.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/screen_util.dart';


class ScreenUtilInit extends StatelessWidget {
/// A helper widget that initializes [ScreenUtil]
ScreenUtilInit({
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: flutter_screenutil
description: A flutter plugin for adapting screen and font size.Guaranteed to look good on different models
version: 5.0.0-nullsafety.7
version: 5.0.0-nullsafety.8
homepage: https://github.com/OpenFlutter/flutter_screenutil

environment:
Expand Down

0 comments on commit f9908fb

Please sign in to comment.