UDeviceInfo.fromMap constructor
Reads it from the native map.
Implementation
factory UDeviceInfo.fromMap(Map<String, Object?> m) => UDeviceInfo(
platform: m.str("platform") ?? _uPlatformName(),
os: m.str("os") ?? _uPlatformName(),
osVersion: m.str("osVersion") ?? "",
osBuild: m.str("osBuild"),
sdkInt: m.integer("sdkInt"),
model: m.str("model") ?? "",
manufacturer: m.str("manufacturer") ?? "",
brand: m.str("brand") ?? m.str("manufacturer") ?? "",
name: m.str("name") ?? "",
type: UDeviceType.values.firstWhere((UDeviceType t) => t.name == m.str("type"), orElse: () => UDeviceType.unknown),
isPhysical: m.flag("physical") ?? true,
id: m.str("id") ?? "",
cpuArch: m.str("arch"),
cpuCores: m.integer("cores"),
totalMemory: m.integer("memory"),
locales: m.strings("locales"),
timeZone: m.str("timeZone"),
is24HourFormat: m.flag("is24h"),
extra: Map<String, Object?>.unmodifiable(m.child("extra")),
);