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

25 lines
503 B
Dart

import 'package:flutter/material.dart';
import './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 Badge(
color: isCommon ? Colors.green : Colors.transparent,
child: Text(
'C',
style: TextStyle(
color: isCommon ? Colors.white : Colors.transparent,
),
),
);
}
}