2021-04-11 01:48:43 +02:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
2024-11-13 22:43:44 +01:00
|
|
|
class CircleBadge extends StatelessWidget {
|
2021-12-01 23:09:53 +01:00
|
|
|
final Widget? child;
|
2021-04-11 01:48:43 +02:00
|
|
|
final Color color;
|
|
|
|
|
2024-11-13 22:43:44 +01:00
|
|
|
const CircleBadge({
|
2022-01-23 18:27:00 +01:00
|
|
|
Key? key,
|
|
|
|
this.child,
|
|
|
|
required this.color,
|
|
|
|
}) : super(key: key);
|
2021-04-11 01:48:43 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
2021-12-01 23:09:53 +01:00
|
|
|
padding: const EdgeInsets.all(5),
|
2021-04-11 01:48:43 +02:00
|
|
|
width: 30,
|
|
|
|
height: 30,
|
2021-12-01 23:09:53 +01:00
|
|
|
margin: const EdgeInsets.symmetric(horizontal: 2),
|
2021-04-11 01:48:43 +02:00
|
|
|
decoration: BoxDecoration(
|
|
|
|
shape: BoxShape.circle,
|
2021-12-01 23:09:53 +01:00
|
|
|
color: color,
|
|
|
|
),
|
2022-01-23 18:27:00 +01:00
|
|
|
child: FittedBox(child: child),
|
|
|
|
);
|
|
|
|
}
|
2021-12-01 23:09:53 +01:00
|
|
|
}
|