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
李卓原
2022-02-10 11:35:03 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
32d5fcb39d3cc191895514d6a43d7b76f772fa03
32d5fcb3
1 parent
b4eaeb1f
5.2.0
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
7 deletions
CHANGELOG.md
example/lib/main_zh.dart
lib/screen_util.dart
pubspec.yaml
CHANGELOG.md
View file @
32d5fcb
# 5.2.0
-
Rollback of 5.1.1 commit
# 5.1.1
-
.w,.h use MediaQuery
# 5.1.0
-
Break Change: updated the first initialization method, please refer to README.md
# 5.0.4
-
Break Change : add setContext() , the first initialization method requires calling
-
fix # 310
-
update ReadMe.md
...
...
example/lib/main_zh.dart
View file @
32d5fcb
import
'dart:ui'
;
import
'package:flutter/material.dart'
;
import
'package:flutter_screenutil/flutter_screenutil.dart'
;
...
...
lib/screen_util.dart
View file @
32d5fcb
...
...
@@ -63,13 +63,11 @@ class ScreenUtil {
/// 当前设备宽度 dp
/// The horizontal extent of this size.
double
get
screenWidth
=>
context
==
null
?
_screenWidth
:
MediaQuery
.
of
(
context
!).
size
.
width
;
double
get
screenWidth
=>
_screenWidth
;
///当前设备高度 dp
///The vertical extent of this size. dp
double
get
screenHeight
=>
context
==
null
?
_screenHeight
:
MediaQuery
.
of
(
context
!).
size
.
height
;
double
get
screenHeight
=>
_screenHeight
;
/// 状态栏高度 dp 刘海屏会更高
/// The offset from the top, in dp
...
...
pubspec.yaml
View file @
32d5fcb
name
:
flutter_screenutil
description
:
A flutter plugin for adapting screen and font size.Guaranteed to look good on different models
version
:
5.
1.1
version
:
5.
2.0
homepage
:
https://github.com/OpenFlutter/flutter_screenutil
publish_to
:
https://pub.dev
...
...
Please
register
or
login
to post a comment