utils/src/global_util library

Constants

isProduction → const bool
kPathIcons → const String
kPathOthers → const String

Properties

isAndroid bool
getter/setter pair
isAppDebugFlag bool
打开app调试模式
getter/setter pair
isDebug bool
final
isIOS bool
getter/setter pair
isMacOS bool
getter/setter pair
isPhone bool
getter/setter pair
isWeb bool
getter/setter pair
isWebInAndroid bool
no setter
isWebInIos bool
no setter
isWebInIPad bool
no setter
isWebInIPhone bool
no setter
isWebInWeChat bool
no setter
isWindows bool
getter/setter pair
userAgent String
no setter
webOrigin String
no setter
webUserAgent String
https://www.jianshu.com/p/40430596e3ab
no setter

Functions

appStoreUrl(String appId) String
appStoreUserReviewsUrl(String appId) String
appStoreWriteReview(String name, String appId) String
assetsImagesPath(String name, {String format = "png"}) String
获取图片路径
assetsImagesPathSvg(String name) String
获取图片路径后缀svg
assetsImagesPathWebP(String name) String
获取图片路径后缀wep
canLaunch(String urlString) Future<bool>
getClipboard() Future<String?>
获取剪贴板内容
hideKeyboard(BuildContext context) → void
全局隐藏键盘
onLaunch(String urlString, {bool forceSafariVC = false, bool forceWebView = false, bool enableJavaScript = false, bool enableDomStorage = false, bool universalLinksOnly = false, Map<String, String> headers = const <String, String>{}, Brightness? statusBarBrightness}) Future<bool>
randomInt(int max) int
随机数(0-max)小于max
setClipboard(String text) Future<void>
将文本内容复制到剪贴板