mirror of
https://github.com/h7x4/Jisho-Study-Tool.git
synced 2024-12-22 22:07:29 +01:00
25 lines
503 B
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,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|