2020-07-11 13:33:31 +02:00
|
|
|
import 'package:flutter/material.dart';
|
2021-12-01 23:09:53 +01:00
|
|
|
|
2022-01-19 02:10:05 +01:00
|
|
|
import '../../../bloc/theme/theme_bloc.dart';
|
2020-07-11 13:33:31 +02:00
|
|
|
|
|
|
|
class Header extends StatelessWidget {
|
2021-03-03 00:24:25 +01:00
|
|
|
final String kanji;
|
2020-07-11 13:33:31 +02:00
|
|
|
|
2021-12-01 23:09:53 +01:00
|
|
|
const Header({
|
|
|
|
required this.kanji,
|
|
|
|
Key? key,
|
|
|
|
}) : super(key: key);
|
2021-08-03 22:13:50 +02:00
|
|
|
|
2020-07-11 13:33:31 +02:00
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
2022-01-19 02:10:05 +01:00
|
|
|
final colors =
|
2021-12-01 23:09:53 +01:00
|
|
|
BlocProvider.of<ThemeBloc>(context).state.theme.kanjiResultColor;
|
2021-08-08 23:16:54 +02:00
|
|
|
|
2021-08-03 22:13:50 +02:00
|
|
|
return AspectRatio(
|
|
|
|
aspectRatio: 1,
|
|
|
|
child: Container(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
borderRadius: BorderRadius.circular(10.0),
|
2022-01-19 02:10:05 +01:00
|
|
|
color: colors.background,
|
2021-08-03 22:13:50 +02:00
|
|
|
),
|
|
|
|
child: Center(
|
|
|
|
child: Text(
|
|
|
|
kanji,
|
2022-01-19 02:10:05 +01:00
|
|
|
style: TextStyle(fontSize: 70.0, color: colors.foreground),
|
2021-08-03 22:13:50 +02:00
|
|
|
),
|
2020-07-11 13:33:31 +02:00
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
}
|
2021-08-03 22:13:50 +02:00
|
|
|
}
|