Update
This commit is contained in:
parent
5865aa445f
commit
ef3379f1d9
3 changed files with 33 additions and 3 deletions
|
@ -12,12 +12,23 @@ class StreamElementCard extends StatelessWidget {
|
|||
@override
|
||||
Widget build(BuildContext context) {
|
||||
IconData icon;
|
||||
Color textColor;
|
||||
switch (streamElement.type) {
|
||||
case StreamElementType.log:
|
||||
icon = Icons.info;
|
||||
textColor = Colors.white;
|
||||
break;
|
||||
case StreamElementType.alert:
|
||||
icon = Icons.notifications_active;
|
||||
textColor = Colors.white;
|
||||
break;
|
||||
case StreamElementType.warning:
|
||||
icon = Icons.warning_rounded;
|
||||
textColor = Colors.yellow[600]!;
|
||||
break;
|
||||
case StreamElementType.error:
|
||||
icon = Icons.error_rounded;
|
||||
textColor = Colors.red[300]!;
|
||||
break;
|
||||
}
|
||||
return Card(
|
||||
|
@ -36,12 +47,13 @@ class StreamElementCard extends StatelessWidget {
|
|||
Icon(
|
||||
icon,
|
||||
size: 30,
|
||||
color: textColor,
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
streamElement.message,
|
||||
style: const TextStyle(fontSize: 16),
|
||||
style: TextStyle(fontSize: 16, color: textColor),
|
||||
),
|
||||
),
|
||||
if (streamElement.type == StreamElementType.alert)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue