mirror of
https://github.com/h7x4/Jisho-Study-Tool.git
synced 2024-12-14 02:41:50 +01:00
22 lines
524 B
Dart
22 lines
524 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(
|
|
child: Column(
|
|
children: [
|
|
(hasFurigana) ? Text(_word.reading) : Text(''),
|
|
(hasFurigana) ? Text(_word.word) : Text(_word.reading),
|
|
],
|
|
),
|
|
);
|
|
}
|
|
}
|