mirror of
https://github.com/h7x4/Jisho-Study-Tool.git
synced 2025-01-22 10:24:46 +01:00
h7x4abk3g
2f63c202fc
commit 17db40663d761fc989803469620e3af5ae62f674 Author: h7x4 <h7x4abk3g@protonmail.com> Date: Sun Jul 19 23:27:31 2020 +0200 Style examples commit 298add43b7d00961de7524560cd37c704c26b885 Author: h7x4abk3g <h7x4abk3g@protonmail.com> Date: Sat Jul 18 18:49:40 2020 +0200 Add examples
92 lines
2.8 KiB
Dart
92 lines
2.8 KiB
Dart
import 'package:flutter/material.dart';
|
|
import 'package:jisho_study_tool/components/kanji/kanji__search_page/examples.dart';
|
|
|
|
import 'package:unofficial_jisho_api/api.dart' as jisho;
|
|
|
|
import './grade.dart';
|
|
import './header.dart';
|
|
import './jlpt_level.dart';
|
|
import './meaning.dart';
|
|
import './radical.dart';
|
|
import './rank.dart';
|
|
import './stroke_order_gif.dart';
|
|
import './onyomi.dart';
|
|
import './kunyomi.dart';
|
|
|
|
class KanjiResultCard extends StatelessWidget {
|
|
final jisho.KanjiResult _result;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return ListView(
|
|
children: [
|
|
Container(
|
|
margin: EdgeInsets.fromLTRB(20.0, 20.0, 20.0, 30.0),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
children: [
|
|
Flexible(
|
|
flex: 1,
|
|
fit: FlexFit.tight,
|
|
child: Center(child: SizedBox()),
|
|
),
|
|
Flexible(
|
|
flex: 1,
|
|
fit: FlexFit.tight,
|
|
child: Center(child: Header(_result.query)),
|
|
),
|
|
Flexible(
|
|
flex: 1,
|
|
fit: FlexFit.tight,
|
|
child: Center(
|
|
child: Radical(_result.radical),
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Meaning(_result.meaning),
|
|
_result.onyomi.length != 0 ? Onyomi(_result.onyomi) : SizedBox.shrink(),
|
|
_result.kunyomi.length != 0 ? Kunyomi(_result.kunyomi) : SizedBox.shrink(),
|
|
IntrinsicHeight(
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
children: [
|
|
StrokeOrderGif(_result.strokeOrderGifUri),
|
|
Container(
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Row(
|
|
children: [
|
|
Text("JLPT: ", style: TextStyle(fontSize: 20.0)),
|
|
JlptLevel(_result.jlptLevel ?? "⨉"),
|
|
],
|
|
),
|
|
Row(
|
|
children: [
|
|
Text("Grade: ", style: TextStyle(fontSize: 20.0)),
|
|
Grade(_result.taughtIn ?? "⨉"),
|
|
],
|
|
),
|
|
Row(
|
|
children: [
|
|
Text("Rank: ", style: TextStyle(fontSize: 20.0)),
|
|
Rank(_result.newspaperFrequencyRank ?? -1),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
),
|
|
],
|
|
),
|
|
),
|
|
Examples(_result.onyomiExamples, _result.kunyomiExamples),
|
|
],
|
|
);
|
|
}
|
|
|
|
KanjiResultCard(this._result);
|
|
}
|