mirror of
https://github.com/h7x4/Jisho-Study-Tool.git
synced 2024-12-23 06:17:29 +01:00
24 lines
601 B
Dart
24 lines
601 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:unofficial_jisho_api/api.dart';
|
|
|
|
class JapaneseHeader extends StatelessWidget {
|
|
final JishoJapaneseWord word;
|
|
const JapaneseHeader(this.word);
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
final hasFurigana = (word.word != null);
|
|
|
|
return Container(
|
|
alignment: Alignment.centerLeft,
|
|
padding: EdgeInsets.only(left: 10.0),
|
|
child: Column(
|
|
children: [
|
|
(hasFurigana) ? Text(word.reading) : Text(''),
|
|
(hasFurigana) ? Text(word.word) : Text(word.reading),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|