2022-01-19 02:10:05 +01:00
|
|
|
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
|
2022-01-23 04:52:28 +01:00
|
|
|
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),
|
2022-01-23 18:27:00 +01:00
|
|
|
alignment: Alignment.center,
|
2022-01-23 04:52:28 +01:00
|
|
|
decoration: BoxDecoration(
|
|
|
|
color: colors.background,
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
|
|
|
),
|
2022-01-23 18:27:00 +01:00
|
|
|
child: FittedBox(
|
|
|
|
child: Text(
|
|
|
|
kanji,
|
|
|
|
style: TextStyle(
|
|
|
|
color: colors.foreground,
|
|
|
|
fontSize: 25,
|
2022-01-23 04:52:28 +01:00
|
|
|
),
|
|
|
|
),
|
2022-01-19 02:10:05 +01:00
|
|
|
),
|
2022-01-23 04:52:28 +01:00
|
|
|
);
|
|
|
|
},
|
2022-01-19 02:10:05 +01:00
|
|
|
),
|
|
|
|
),
|
2022-01-23 04:52:28 +01:00
|
|
|
);
|
2022-01-19 02:10:05 +01:00
|
|
|
}
|