DeviceInfo class
Core device hardware information.
Mirrors iOS DeviceInfo from RunAnywhere SDK.
This is embedded in DeviceRegistrationRequest and also available standalone
via DeviceRegistrationService.currentDeviceInfo.
Constructors
- DeviceInfo({required String deviceId, required String modelIdentifier, required String modelName, required String architecture, required String osVersion, required String platform, required String deviceType, required String formFactor, required int totalMemory, required int processorCount})
-
const
-
DeviceInfo.fromJson(Map<
String, dynamic> json) -
factory
Properties
- architecture → String
-
CPU architecture (e.g., "arm64", "x86_64")
final
- cleanOSVersion → String
-
Clean OS version (e.g., "17.2" instead of "Version 17.2 (Build 21C52)")
no setter
- deviceId → String
-
Persistent device UUID (survives app reinstalls via Keychain)
final
- deviceType → String
-
Device type for API requests (mobile, tablet, desktop, tv, watch, vr)
final
- formFactor → String
-
Form factor (phone, tablet, laptop, desktop, tv, watch, headset)
final
- hashCode → int
-
The hash code for this object.
no setteroverride
- modelIdentifier → String
-
Device model identifier (e.g., "iPhone16,2" for iPhone 15 Pro Max)
final
- modelName → String
-
User-friendly device name (e.g., "iPhone 15 Pro Max")
final
- osVersion → String
-
Operating system version string (e.g., "17.2")
final
- platform → String
-
Platform identifier (e.g., "iOS", "android")
final
- processorCount → int
-
Number of processor cores
final
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- totalMemory → int
-
Total physical memory in bytes
final
Methods
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toJson(
) → Map< String, dynamic> -
toString(
) → String -
A string representation of this object.
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
override
Static Methods
-
current(
String deviceId) → DeviceInfo - Get current device info - called fresh each time. Note: deviceId is async, so use DeviceInfo.fetchCurrent() for full info.
-
fetchCurrent(
) → Future< DeviceInfo> - Fetch current device info asynchronously (includes persistent deviceId).