Fix search bug where header would be null
This commit is contained in:
parent
4dfb42f4b6
commit
a179efc710
|
@ -7,7 +7,7 @@ class JapaneseHeader extends StatelessWidget {
|
|||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final hasFurigana = (word.word != null);
|
||||
final hasFurigana = (word.word != null && word.reading != null);
|
||||
|
||||
return Container(
|
||||
alignment: Alignment.centerLeft,
|
||||
|
@ -15,7 +15,7 @@ class JapaneseHeader extends StatelessWidget {
|
|||
child: Column(
|
||||
children: [
|
||||
(hasFurigana) ? Text(word.reading) : Text(''),
|
||||
(hasFurigana) ? Text(word.word) : Text(word.reading),
|
||||
(hasFurigana) ? Text(word.word) : Text(word.reading ?? word.word),
|
||||
],
|
||||
),
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue