getDeviceInfo static method
Obtiene información de debug sobre el dispositivo actual
Implementation
static Map<String, dynamic> getDeviceInfo(BuildContext context) {
final screenInfo = ScreenScalerInheritedWidget.of(context)?.info;
if (screenInfo == null) {
return {'error': 'ScreenSizeInitializer no encontrado'};
}
return {
'deviceType': screenInfo.deviceType.toString(),
'width': screenInfo.width,
'height': screenInfo.height,
'textScale': screenInfo.textScale,
'platform': defaultTargetPlatform.toString(),
};
}