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

25 lines
514 B
Dart

import 'package:flutter/material.dart';
import 'circle_badge.dart';
class CommonBadge extends StatelessWidget {
final bool isCommon;
const CommonBadge({
required this.isCommon,
Key? key,
}) : super(key: key);
@override
Widget build(BuildContext context) {
return CircleBadge(
color: isCommon ? Colors.green : Colors.transparent,
child: Text(
'C',
style: TextStyle(
color: isCommon ? Colors.white : Colors.transparent,
),
),
);
}
}