UDeviceInfo class

Device facts (model, OS, id, locales, time zone…) — see UApp.deviceInfo.

Annotations

Constructors

UDeviceInfo({required String platform, required String os, required String osVersion, required String model, required String manufacturer, required String brand, required String name, required UDeviceType type, required bool isPhysical, required String id, String? osBuild, int? sdkInt, String? cpuArch, int? cpuCores, int? totalMemory, List<String> locales = const <String>[], String? timeZone, bool? is24HourFormat, Map<String, Object?> extra = const <String, Object?>{}})
const
UDeviceInfo.fromMap(Map<String, Object?> m)
Reads it from the native map.
factory

Properties

brand → String
Brand.
final
cpuArch → String?
"arm64", "x86_64", …
final
cpuCores → int?
CPU cores.
final
extra → Map<String, Object?>
Platform-specific extras (Android fingerprint / ABIs / security patch, Windows edition, Linux os-release, browser, …).
final
hashCode → int
The hash code for this object.
no setterinherited
id → String
See UDevice.id.
final
is24HourFormat → bool?
24-hour clock setting.
final
isPhysical → bool
False on emulators, simulators and virtual machines.
final
locales → List<String>
Preferred languages as BCP-47 tags, most preferred first.
final
manufacturer → String
Maker.
final
model → String
Hardware model: "SM-S918B", "iPhone16,1", "MacBookPro18,3", …
final
name → String
The name the user gave the device (Android / macOS / Windows / Linux hostname). Generic on iOS 16+.
final
os → String
Marketing OS name: "Android", "iOS", "iPadOS", "macOS", "Windows 11", "Ubuntu", "Chrome on Android", …
final
osBuild → String?
Build identifier (Android build id, Apple build "21E236", Windows build + UBR, kernel on Linux).
final
osVersion → String
"14", "17.4.1", "14.4", "10.0.22631", …
final
platform → String
android, ios, macos, windows, linux or web.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
sdkInt → int?
Android API level.
final
timeZone → String?
IANA time zone, e.g. "Asia/Tehran".
final
totalMemory → int?
Physical RAM in bytes.
final
type → UDeviceType
Phone, tablet, desktop…
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toMap() → Map<String, Object?>
As a map.
toString() → String
A string representation of this object.
override

Operators

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