loadDeviceInfo method

  1. @override
Future<DeviceInfo> loadDeviceInfo()
override

Implementation

@override
Future<DeviceInfo> loadDeviceInfo() async {
  DeviceInfo _deviceInfo;
  try {
    _deviceInfo = await infoX.loadDeviceInfo().timeout(1.seconds);
  } catch (e) {
    log.info("Problem getting device info: $e");
    _deviceInfo = DeviceInfo(
      geo: null,
      isSimulator: false,
      softwareVersion: "unknown",
      locale: "en-US",
      language: "en",
      deviceType: "unknown",
      deviceModel: "unknown",
      deviceBrand: "unknown",
      ipAddress: "unknown",
      deviceId: uuid(),
      software: "unknown",
    );
  }
  return _deviceInfo;
}