39 lines
959 B
Dart
39 lines
959 B
Dart
import 'package:flutter/material.dart';
|
|
|
|
class AvatarBadge extends StatelessWidget {
|
|
final String initials;
|
|
final Color color;
|
|
|
|
const AvatarBadge({super.key, required this.initials, required this.color});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Container(
|
|
width: 24,
|
|
height: 24,
|
|
padding: const EdgeInsets.all(1),
|
|
decoration: BoxDecoration(
|
|
color: color,
|
|
borderRadius: BorderRadius.circular(2),
|
|
),
|
|
child: Container(
|
|
decoration: BoxDecoration(
|
|
color: const Color(0xFF1A1A2E),
|
|
borderRadius: BorderRadius.circular(1),
|
|
),
|
|
child: Center(
|
|
child: Text(
|
|
initials,
|
|
style: TextStyle(
|
|
color: color,
|
|
fontFamily: 'Roboto',
|
|
fontSize: 10,
|
|
fontWeight: FontWeight.w700,
|
|
letterSpacing: 0,
|
|
),
|
|
),
|
|
),
|
|
),
|
|
);
|
|
}
|
|
} |