Global class

全局常量

Constructors

Global()

Properties

hashCode → int
The hash code for this object.
read-only, inherited
runtimeType → Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed.
inherited
toString() → String
Returns a string representation of this object.
inherited

Operators

operator ==(dynamic other) → bool
The equality operator.
inherited

Static Properties

appTheme ThemeData
全局的theme
read / write
isIphoneX ↔ bool
read / write
onePixel ↔ double
一个物理像素, 不建议使用, 渲染会有问题
read / write
primaryColor Color
read / write
primaryColorDark Color
read / write
screenHeight ↔ double
read / write
screenWidth ↔ double
需要手动去android和ios工程中限定设备方向, 不然如果旋转了屏幕的话, 这里的值就不准了 android: Manifest.xml activity节点设置android:screenOrientation为portrait ios: 点击项目, General标签, Device Orientation只选择Portrait
read / write
textTheme TextTheme
read / write

Static Methods

init(BuildContext context) → dynamic

Constants

kFalse → const String
'false'
kTrue → const String
'true'