Util class

Constructors

Util()

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
A string representation of this object. [...]
inherited

Operators

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

Static Properties

bundleDirectory String
write-only
isAndroid bool
read-only

Static Methods

copyData(String data, [bool showSuccess = true]) Future<void>
degreeToRadians(dynamic value) double
将度数转换为弧度
getAbsolute(dynamic value) Map<String, double>
getAlignment(dynamic value, [Alignment defaultValue = Alignment.topLeft]) Alignment
getBoolean(dynamic value, {bool nullIsTrue = false}) bool
将 value 转换为 boolean nullIsTrue 当 value 为 null 时是否返回 true
getBorder(dynamic border) Border
getBorderRadius(dynamic value) BorderRadius
getBoxFit(dynamic value) BoxFit
getBoxShadow(dynamic value) List<BoxShadow>
getBundleFilePath(dynamic filePathInBundle) String
getColor(dynamic value) Color
getCrossAxisAlignment(dynamic value) CrossAxisAlignment
getDirection(dynamic value) String
getDouble(dynamic value, {Range range}) double
getDoubleList(dynamic value, {int length = 4, double defaultValue = 0}) List<double>
getDynamicModelList(dynamic value) List<DynamicModel>
getEdgeInsets(dynamic value) EdgeInsets
getGradient(dynamic value) Gradient
getInt(dynamic value) int
getList(dynamic value) List
getListFirst(List list) → dynamic
getListLast(List list) → dynamic
getMainAxisAlignment(dynamic value) MainAxisAlignment
getSafeString(dynamic value) String
getString(dynamic value) String
getTextAlign(dynamic value) TextAlign
getTextDecoration(dynamic value) TextDecoration
getTextOverflow(dynamic value) TextOverflow
getTextShadow(dynamic value) List<Shadow>
getTextSpan(dynamic value) TextSpan
getTextStyle(dynamic value, [bool useDefaultLineHeight = true]) TextStyle
getTextWeight(dynamic value) FontWeight
getTransform(dynamic value) Matrix4
getWidgetList(dynamic value) List<Widget>
getWrapAlignment(dynamic value) WrapAlignment
onError(DynamicFlutterError error) → void
onWhiteScreen(dynamic reason, [BuildContext context]) Widget
白屏触发
request(dynamic params) Future<Map<String, dynamic>>
showToast(String content) → void
throttle(Function callback, [int delay = 16]) Function
节流函数,默认 32ms