MediaUtils class

Constructors

MediaUtils()
factory

Properties

bottomBarHeight double
底部安全区距离 dp
no setter
context BuildContext?
返回全局material上下文
no setter
hashCode int
The hash code for this object.
no setterinherited
pixelRatio double
设备的像素密度
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
screenHeight double
屏幕高度
no setter
screenPixelHeight double
屏幕像素高度
no setter
screenPixelWidth double
屏幕像素宽度
no setter
screenWidth double
屏幕宽度
no setter
sizeScale double
屏幕尺寸比例
no setter
statusBarHeight double
状态栏高度 dp 刘海屏会更高
no setter

Methods

height(double designHeight) double
实际高度 designHeight 设计搞高度
initialize(double designWidth) → void
应用启动时调用 designWidth 设计搞宽度
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
screen(ScreenOrientation orientation) → void
强制竖屏 orientation当前屏幕方向
setContext(BuildContext context) → void
保存material上下文
sp(double fontSize) double
字体大小适配
toString() String
A string representation of this object.
inherited
width(double designWidth) double
实际宽度 designWidth 设计搞宽度

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Properties

instance MediaUtils
no setter