DeviceInfo class

设备信息结构体

包含常用的主流设备环境关键信息, 以便于快速判断和分析设备类型、系统以及硬件相关数据。

Constructors

DeviceInfo({required String systemName, required String systemVersion, required String model, required String modelMachine, required String modelName, required bool isPhysicalDevice, required String brand})

Properties

brand → String
品牌(如 'Apple', 'Moto', 'Huawei')
final
hashCode → int
The hash code for this object.
no setterinherited
isPhysicalDevice → bool
是否为物理设备(非模拟器)
final
model → String
设备型号,如 'iPhone', 'iPad', 'Pixel'
final
modelMachine → String
设备机器码,iOS为 'iPhone15,6',Android例: 'Moto G (4)'
final
modelName → String
设备可读名称(如 'iPhone 14 Pro')
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
systemName → String
操作系统名称,例如: 'iOS' 或 'Android'
final
systemVersion → String
操作系统版本号,例如: '18.5'、 '15'
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() → Map<String, dynamic>
转换为JSON格式(Map)
toString() → String
A string representation of this object.
inherited

Operators

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