DeviceInfo class

设备信息获取工具

Constructors

DeviceInfo({required String deviceId, required String deviceModel, required String platform, required String osVersion, required String appVersion, required String appBuildNumber, Map<String, dynamic> additionalInfo = const {}})
const

Properties

additionalInfo Map<String, dynamic>
final
appBuildNumber String
final
appVersion String
final
deviceId String
final
deviceModel String
final
hashCode int
The hash code for this object.
no setterinherited
isPhysicalDevice bool
检查是否为真机
no setter
osVersion String
final
performanceLevel String
获取设备性能等级 (估算)
no setter
platform String
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getUniqueIdentifier() String
获取设备唯一标识符
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
转换为JSON
toString() String
A string representation of this object.
override

Operators

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

Static Methods

getInstance() Future<DeviceInfo>
获取设备信息单例
refresh() Future<void>
刷新设备信息