AppUtils class
应用工具类 提供获取原生平台应用版本号、版本码等功能
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
-
appVersionCode
→ Future<
String?> -
获取应用版本码(如 "1" 或 "100")
Android: packageInfo.versionCode (long)
iOS: CFBundleVersion
no setter
-
appVersionName
→ Future<
String?> -
获取应用版本号(如 "1.0.0")
Android: packageInfo.versionName
iOS: CFBundleShortVersionString
no setter
Static Methods
-
getAppVersionInfo(
) → Future< Map< String, String> > - 获取应用版本信息,返回包含 versionName 和 versionCode 的 Map 示例: {"versionName": "1.0.0", "versionCode": "1"}