2022-01-23 18:27:00 +01:00
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
import '../../../../routing/routes.dart';
|
2023-02-24 09:55:55 +01:00
|
|
|
import '../../../common/kanji_box.dart';
|
2022-01-23 18:27:00 +01:00
|
|
|
|
|
|
|
class KanjiRow extends StatelessWidget {
|
|
|
|
final List<String> kanji;
|
|
|
|
final double fontSize;
|
|
|
|
const KanjiRow({
|
|
|
|
Key? key,
|
|
|
|
required this.kanji,
|
|
|
|
this.fontSize = 20,
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Column(
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
const Text(
|
|
|
|
'Kanji:',
|
|
|
|
style: TextStyle(fontWeight: FontWeight.bold),
|
|
|
|
),
|
|
|
|
const SizedBox(height: 5),
|
|
|
|
Wrap(
|
|
|
|
spacing: 10,
|
|
|
|
runSpacing: 10,
|
|
|
|
children: [
|
|
|
|
for (final k in kanji)
|
|
|
|
InkWell(
|
|
|
|
onTap: () => Navigator.pushNamed(
|
|
|
|
context,
|
|
|
|
Routes.kanjiSearch,
|
|
|
|
arguments: k,
|
|
|
|
),
|
2023-02-24 09:55:55 +01:00
|
|
|
child: KanjiBox.headline4(
|
|
|
|
context: context,
|
|
|
|
kanji: k,
|
|
|
|
),
|
2022-01-23 18:27:00 +01:00
|
|
|
)
|
|
|
|
],
|
|
|
|
),
|
|
|
|
],
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|