28 lines
825 B
Dart
28 lines
825 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
import '../models/sync_run_event.dart';
|
|
import '../utils/sync_run_formatters.dart';
|
|
|
|
class SyncRunStatusChip extends StatelessWidget {
|
|
const SyncRunStatusChip({super.key, required this.event});
|
|
|
|
final SyncRunEvent event;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final Color color = severityColor(event.severity);
|
|
return Container(
|
|
padding: const EdgeInsets.symmetric(horizontal: 8, vertical: 2),
|
|
decoration: BoxDecoration(
|
|
color: color.withValues(alpha: 0.15),
|
|
borderRadius: BorderRadius.circular(12),
|
|
border: Border.all(color: color.withValues(alpha: 0.5)),
|
|
),
|
|
child: Text(
|
|
shortStatusLabel(event),
|
|
style: TextStyle(color: color, fontSize: 12, fontWeight: FontWeight.w600),
|
|
),
|
|
);
|
|
}
|
|
}
|