Jisho-Study-Tool/lib/components/search/search_results_body/parts/common_badge.dart

25 lines
514 B
Dart
Raw Normal View History

2021-04-11 01:48:43 +02:00
import 'package:flutter/material.dart';
2024-11-13 22:43:44 +01:00
import 'circle_badge.dart';
2021-04-11 01:48:43 +02:00
class CommonBadge extends StatelessWidget {
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) {
2024-11-13 22:43:44 +01:00
return CircleBadge(
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
}