2021-04-11 01:48:43 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2021-09-07 00:05:33 +02:00
|
|
|
import './badge.dart';
|
2021-04-11 01:48:43 +02:00
|
|
|
|
|
|
|
class CommonBadge extends StatelessWidget {
|
2021-08-03 22:13:50 +02:00
|
|
|
final bool isCommon;
|
2021-04-11 01:48:43 +02:00
|
|
|
|
2021-12-01 23:09:53 +01:00
|
|
|
const CommonBadge({
|
|
|
|
required this.isCommon,
|
|
|
|
Key? key,
|
|
|
|
}) : super(key: key);
|
2021-04-11 01:48:43 +02:00
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Badge(
|
2021-12-01 23:09:53 +01:00
|
|
|
color: isCommon ? Colors.green : Colors.transparent,
|
|
|
|
child: Text(
|
|
|
|
'C',
|
|
|
|
style: TextStyle(
|
|
|
|
color: isCommon ? Colors.white : Colors.transparent,
|
|
|
|
),
|
2021-04-11 01:48:43 +02:00
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
2021-12-01 23:09:53 +01:00
|
|
|
}
|