updateResolution method
Actualiza la resolución de pantalla (optimizado)
Implementation
void updateResolution(String resolution) {
if (_cachedDeviceInfo != null && _cachedDeviceInfo!.resolution != resolution) {
_cachedDeviceInfo = Device(
name: _cachedDeviceInfo!.name,
resolution: resolution,
manufacturer: _cachedDeviceInfo!.manufacturer,
model: _cachedDeviceInfo!.model,
modelId: _cachedDeviceInfo!.modelId,
memorySize: _cachedDeviceInfo!.memorySize,
bootTime: _cachedDeviceInfo!.bootTime,
formFactor: _cachedDeviceInfo!.formFactor,
orientation: _cachedDeviceInfo!.orientation,
rooted: _cachedDeviceInfo!.rooted,
osName: _cachedDeviceInfo!.osName,
osVersion: _cachedDeviceInfo!.osVersion,
emulated: _cachedDeviceInfo!.emulated,
architecture: _cachedDeviceInfo!.architecture,
freeMemory: _cachedDeviceInfo!.freeMemory,
internalStorageFreeSize: _cachedDeviceInfo!.internalStorageFreeSize,
externalStorageFreeSize: _cachedDeviceInfo!.externalStorageFreeSize,
batteryLevel: _cachedDeviceInfo!.batteryLevel,
carrier: _cachedDeviceInfo!.carrier,
networkType: _cachedDeviceInfo!.networkType,
ip: _cachedDeviceInfo!.ip,
proxy: _cachedDeviceInfo!.proxy,
vpn: _cachedDeviceInfo!.vpn,
);
// Incrementar versión para invalidar cache
_incrementDeviceInfoVersion();
}
}