getDeviceIdentity method

  1. @override
Future<Map<String, dynamic>> getDeviceIdentity()
override

Raw device and app identity map from the host.

Implementation

@override
Future<Map<String, dynamic>> getDeviceIdentity() async {
  final screen = web.window.screen;
  final nav = web.window.navigator;
  return <String, dynamic>{
    'manufacturer': 'unknown',
    'model': nav.platform,
    'os_name': 'Web',
    'os_version': nav.userAgent,
    'os_sdk_int': null,
    'app_version': web.window.location.hostname,
    'build_number': 'web',
    'cpu_architecture': nav.platform,
    'screen_width': screen.width,
    'screen_height': screen.height,
    'device_pixel_ratio': web.window.devicePixelRatio,
    'locale': nav.language,
    'time_zone': DateTime.now().timeZoneName,
    'is_physical_device': true,
  };
}