DeviceIntegrityResult.fromMap constructor

DeviceIntegrityResult.fromMap(
  1. Map<String, dynamic> map
)

Implementation

factory DeviceIntegrityResult.fromMap(Map<String, dynamic> map) {
  if (Platform.isAndroid) {
    return DeviceIntegrityResult._(
      isDeveloperModeEnabled: map['isDeveloperModeEnabled'] ?? false,
      isRooted: map['isRooted'] ?? false,
      isEmulator: map['isEmulator'] ?? false,
      hasPotentiallyDangerousApps: map['hasPotentiallyDangerousApps'] ?? false,
    );
  } else if (Platform.isIOS) {
    return DeviceIntegrityResult._(
      isDeveloperModeEnabled: map['isDeveloperModeEnabled'] ?? false,
      isJailbroken: map['isJailbroken'] ?? false,
      isRealDevice: map['isRealDevice'] ?? true,
    );
  }

  return DeviceIntegrityResult._(isDeveloperModeEnabled: false);
}