1
0
mirror of https://github.com/h7x4/Jisho-Study-Tool.git synced 2024-12-23 14:27:30 +01:00
Jisho-Study-Tool/lib/view/components/search/search_result_page/search_card.dart

30 lines
691 B
Dart

import 'package:flutter/material.dart';
import 'package:unofficial_jisho_api/api.dart';
import './parts/header.dart';
import './parts/senses.dart';
import './parts/other_forms.dart';
class SearchResultCard extends StatelessWidget {
final JishoResult _result;
JishoJapaneseWord _mainWord;
List<JishoJapaneseWord> _otherForms;
SearchResultCard(this._result) {
this._mainWord = _result.japanese[0];
this._otherForms = _result.japanese.sublist(1);
}
@override
Widget build(BuildContext context) {
return ExpansionTile(
title: JapaneseHeader(_mainWord),
children: [
Senses(_result.senses),
OtherForms(_otherForms),
],
);
}
}