1
0
mirror of https://github.com/h7x4/Jisho-Study-Tool.git synced 2024-12-21 21:47:29 +01:00

Remove redundant code

This commit is contained in:
Oystein Kristoffer Tveit 2020-07-16 18:44:18 +02:00
parent eb3caf16bd
commit 5c04142c2a

View File

@ -1,22 +0,0 @@
import 'package:flutter/material.dart';
import 'package:unofficial_jisho_api/api.dart' as jisho;
import 'package:jisho_study_tool/components/kanji/kanji__search_page/kanji_search_page.dart';
import 'package:jisho_study_tool/services/kanji_search.dart';
Widget searchForKanji(String kanji) {
return FutureBuilder(
future: fetchKanji(kanji),
builder: (BuildContext context, AsyncSnapshot<jisho.KanjiResult> snapshot) {
if (snapshot.hasData) {
return KanjiResultCard(snapshot.data);
} else if (snapshot.hasError) {
throw 'ASYNC ERROR';
} else {
return Center(
child: CircularProgressIndicator(),
);
}
},
);
}