CommonUtils class
通用逻辑-基本方法管理
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent 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
- isReception ↔ bool
-
getter/setter pair
- pageStatusEmpty ↔ int
-
getter/setter pair
- pageStatusError ↔ int
-
getter/setter pair
- pageStatusLoading ↔ int
-
getter/setter pair
- pageStatusProgress ↔ int
-
getter/setter pair
- pageStatusSuccess ↔ int
-
getter/setter pair
- toast ↔ dynamic
-
getter/setter pair
- toastDismiss ↔ dynamic
-
getter/setter pair
- toastLoad ↔ dynamic
-
getter/setter pair
Static Methods
-
checkIsCurrent(
dynamic context, dynamic back, {dynamic noBack}) → dynamic -
compareString(
String? str) → String -
compressImageUrl(
String url, {int width = 0}) → String -
dialogExitApp(
BuildContext context) → Future< bool> - 不退出
-
dismiss(
) → void -
getLoadWidget(
String? url, String imageIcon, String imageUrl, String load, Color colorBg, Color colorProgress, {double? width, double? height, Alignment? alignment, BoxFit? fit, String? package, Map< String, String> ? headers}) → Widget -
getLocalPath(
) → dynamic -
getNewsTimeStr(
dynamic context, DateTime date) → String - 日期格式转换
-
getTimeDayStr(
String time, {bool min = true}) → String -
getTimeStr(
DateTime date, {bool min = false}) → String -
needShowTime(
int sentTime1, int sentTime2) → bool - 是否需要显示时间,相差2分钟
-
saveImage(
String url) → dynamic -
showErrorToast(
BuildContext? context, {dynamic res, dynamic back}) → dynamic - 错误提示统一
-
showLoading(
{String? msg}) → void -
showToast(
dynamic msg) → void -
splitFileNameByPath(
String path) → dynamic
Constants
- daysLimit → const double
- hoursLimit → const double
- millisLimit → const double
- minutesLimit → const double
- secondsLimit → const double