|
|
|
|
@ -65,49 +65,49 @@ class _UnsafeDeviceState extends State<UnsafeDevice> {
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 24.h),
|
|
|
|
|
// if (getIt.get<SecurityService>().detectedThreats.isNotEmpty) ...[
|
|
|
|
|
// Text(
|
|
|
|
|
// 'Detected Issues:',
|
|
|
|
|
// style: TextStyle(
|
|
|
|
|
// fontSize: 14.f,
|
|
|
|
|
// fontWeight: FontWeight.bold,
|
|
|
|
|
// color: Colors.black87,
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(height: 8.h),
|
|
|
|
|
// Container(
|
|
|
|
|
// padding: EdgeInsets.all(12.w),
|
|
|
|
|
// decoration: BoxDecoration(
|
|
|
|
|
// color: Colors.red.withOpacity(0.1),
|
|
|
|
|
// borderRadius: BorderRadius.circular(8.r),
|
|
|
|
|
// border: Border.all(color: Colors.red.withOpacity(0.3)),
|
|
|
|
|
// ),
|
|
|
|
|
// child: Column(
|
|
|
|
|
// children: getIt
|
|
|
|
|
// .get<SecurityService>()
|
|
|
|
|
// .detectedThreats
|
|
|
|
|
// .where((t) => t.severity == ThreatSeverity.critical)
|
|
|
|
|
// .take(5) // Show max 5 threats
|
|
|
|
|
// .map((threat) => Padding(
|
|
|
|
|
// padding: EdgeInsets.symmetric(vertical: 4.h),
|
|
|
|
|
// child: Row(
|
|
|
|
|
// children: [
|
|
|
|
|
// Icon(Icons.error_outline, size: 16.f, color: Colors.red),
|
|
|
|
|
// SizedBox(width: 8.w),
|
|
|
|
|
// Expanded(
|
|
|
|
|
// child: Text(
|
|
|
|
|
// threat.threatType,
|
|
|
|
|
// style: TextStyle(fontSize: 12.f),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// ],
|
|
|
|
|
// ),
|
|
|
|
|
// ))
|
|
|
|
|
// .toList(),
|
|
|
|
|
// ),
|
|
|
|
|
// ),
|
|
|
|
|
// SizedBox(height: 24.h),
|
|
|
|
|
// ],
|
|
|
|
|
if (getIt.get<SecurityService>().detectedThreats.isNotEmpty) ...[
|
|
|
|
|
Text(
|
|
|
|
|
'Detected Issues:',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
fontSize: 14.f,
|
|
|
|
|
fontWeight: FontWeight.bold,
|
|
|
|
|
color: Colors.black87,
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 8.h),
|
|
|
|
|
Container(
|
|
|
|
|
padding: EdgeInsets.all(12.w),
|
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
|
color: Colors.red.withOpacity(0.1),
|
|
|
|
|
borderRadius: BorderRadius.circular(8.r),
|
|
|
|
|
border: Border.all(color: Colors.red.withOpacity(0.3)),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: getIt
|
|
|
|
|
.get<SecurityService>()
|
|
|
|
|
.detectedThreats
|
|
|
|
|
.where((t) => t.severity == ThreatSeverity.critical)
|
|
|
|
|
.take(5) // Show max 5 threats
|
|
|
|
|
.map((threat) => Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 4.h),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Icon(Icons.error_outline, size: 16.f, color: AppColors.primaryRedColor),
|
|
|
|
|
SizedBox(width: 8.w),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
threat.threatType,
|
|
|
|
|
style: TextStyle(fontSize: 12.f),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
))
|
|
|
|
|
.toList(),
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 24.h),
|
|
|
|
|
],
|
|
|
|
|
],
|
|
|
|
|
),
|
|
|
|
|
),
|
|
|
|
|
|