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

30 lines
754 B
Dart

import 'package:flutter/material.dart';
import '../../../../../models/themes/theme.dart';
class SearchChip extends StatelessWidget {
final String text;
final ColorSet colors;
final TextStyle? extraTextStyle;
const SearchChip({
Key? key,
required this.text,
this.colors = LightTheme.defaultMenuGreyNormal,
this.extraTextStyle,
}) : super(key: key);
@override
Widget build(BuildContext context) => Container(
padding: const EdgeInsets.all(10),
decoration: BoxDecoration(
color: colors.background,
borderRadius: BorderRadius.circular(10.0),
),
child: Text(
text,
style: TextStyle(color: colors.foreground).merge(extraTextStyle),
),
);
}