|
|
|
|
@ -65,7 +65,7 @@ class _UnsafeDeviceState extends State<UnsafeDevice> {
|
|
|
|
|
textAlign: TextAlign.center,
|
|
|
|
|
),
|
|
|
|
|
SizedBox(height: 24),
|
|
|
|
|
if (locator.get<SecurityService>().detectedThreats.isNotEmpty) ...[
|
|
|
|
|
if (service.detectedThreats.isNotEmpty) ...[
|
|
|
|
|
Text(
|
|
|
|
|
'Detected Issues:',
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
@ -83,16 +83,15 @@ class _UnsafeDeviceState extends State<UnsafeDevice> {
|
|
|
|
|
border: Border.all(color: Colors.red.withOpacity(0.3)),
|
|
|
|
|
),
|
|
|
|
|
child: Column(
|
|
|
|
|
children: locator
|
|
|
|
|
.get<SecurityService>()
|
|
|
|
|
.detectedThreats
|
|
|
|
|
children: service.detectedThreats
|
|
|
|
|
.where((t) => t.severity == ThreatSeverity.critical)
|
|
|
|
|
.take(5) // Show max 5 threats
|
|
|
|
|
.map((threat) => Padding(
|
|
|
|
|
padding: EdgeInsets.symmetric(vertical: 4),
|
|
|
|
|
child: Row(
|
|
|
|
|
children: [
|
|
|
|
|
Icon(Icons.error_outline, size: 16, color: Colors.red),
|
|
|
|
|
Icon(Icons.error_outline,
|
|
|
|
|
size: 16, color: Colors.red),
|
|
|
|
|
SizedBox(width: 8),
|
|
|
|
|
Expanded(
|
|
|
|
|
child: Text(
|
|
|
|
|
|