1
0
mirror of https://github.com/h7x4/Jisho-Study-Tool.git synced 2024-12-22 13:57:29 +01:00
Jisho-Study-Tool/lib/components/history/kanji_box.dart
h7x4 28f900c02e
Add more content to search results (#31)
* Add lots of new functionality to search results

* Fix jlpt level

* Make antonyms clickable

* Add kanji list

* Replace Blocof with BlocBuilder

* Make kanji widgets squared

* Add missing colons to headers

* add romaji under sentences

* Fix extensive search not showing

* Miscellaneous refactoring
2022-01-23 18:27:00 +01:00

42 lines
1.1 KiB
Dart

import 'package:flutter/material.dart';
import '../../bloc/theme/theme_bloc.dart';
class KanjiBox extends StatelessWidget {
final String kanji;
const KanjiBox({
Key? key,
required this.kanji,
}) : super(key: key);
@override
Widget build(BuildContext context) => IntrinsicHeight(
child: AspectRatio(
aspectRatio: 1,
child: BlocBuilder<ThemeBloc, ThemeState>(
builder: (context, state) {
final colors = state.theme.menuGreyLight;
return Container(
padding: const EdgeInsets.all(5),
alignment: Alignment.center,
decoration: BoxDecoration(
color: colors.background,
borderRadius: BorderRadius.circular(10.0),
),
child: FittedBox(
child: Text(
kanji,
style: TextStyle(
color: colors.foreground,
fontSize: 25,
),
),
),
);
},
),
),
);
}