Remove redundant code

This commit is contained in:
Oystein Kristoffer Tveit 2020-07-16 18:44:18 +02:00
parent eb3caf16bd
commit 5c04142c2a
1 changed files with 0 additions and 22 deletions

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(),
);
}
},
);
}