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

19 lines
482 B
Dart

import 'package:flutter/material.dart';
import 'package:jisho_study_tool/view/components/search/search_result_page/parts/badge.dart';
class CommonBadge extends StatelessWidget {
bool isCommon;
CommonBadge(this.isCommon);
@override
Widget build(BuildContext context) {
return Badge(
Text(
"C",
style: TextStyle(color: this.isCommon ? Colors.white : Colors.transparent)
),
this.isCommon ? Colors.green : Colors.transparent
);
}
}