Files
sendico/frontend/pweb/lib/pages/address_book/page/recipient/status.dart
2025-11-13 15:06:15 +03:00

33 lines
758 B
Dart

import 'package:flutter/material.dart';
import 'package:pshared/models/recipient/status.dart';
class RecipientStatusDot extends StatelessWidget {
final RecipientStatus status;
const RecipientStatusDot({super.key, required this.status});
@override
Widget build(BuildContext context) {
Color color;
switch (status) {
case RecipientStatus.ready:
color = Colors.green;
break;
case RecipientStatus.notRegistered:
color = Theme.of(context).colorScheme.error;
break;
case RecipientStatus.registered:
color = Colors.yellow;
break;
}
return Container(
width: 12,
height: 12,
decoration: BoxDecoration(shape: BoxShape.circle, color: color),
);
}
}