feat(ground-suite): add replay observability console
This commit is contained in:
1 parent
1d28db2983
commit
c06c293f49
33 files changed
+2636
No files matched your search
@@ -0,0 +1,25 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../core/observations/observed_event.dart';
|
||||
|
||||
class SeverityBadge extends StatelessWidget {
|
||||
const SeverityBadge({required this.level, super.key});
|
||||
|
||||
final MavSeverity level;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final (icon, color) = switch (level.wireValue) {
|
||||
0 || 1 || 2 || 3 => (Icons.error_outline, Colors.red.shade700),
|
||||
4 => (Icons.warning_amber_outlined, Colors.orange.shade800),
|
||||
5 || 6 => (Icons.info_outline, Colors.blue.shade700),
|
||||
7 => (Icons.bug_report_outlined, Colors.grey.shade700),
|
||||
_ => (Icons.help_outline, Colors.grey.shade700),
|
||||
};
|
||||
|
||||
return Semantics(
|
||||
label: 'Severity: ${level.label}',
|
||||
child: Icon(icon, color: color),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user