1
0
mirror of https://github.com/h7x4/Jisho-Study-Tool.git synced 2024-12-23 06:17:29 +01:00
Jisho-Study-Tool/lib/view/components/search/search_result_page/search_card.dart
2021-03-03 00:24:25 +01:00

30 lines
680 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),
],
);
}
}