mirror of
https://github.com/h7x4/Jisho-Study-Tool.git
synced 2024-12-22 13:57:29 +01:00
h7x4
76d2b090f3
* Add division package * Add base logic and widget * Finish layout * Fix kanji regex * Add bloc logic
34 lines
684 B
Dart
34 lines
684 B
Dart
import 'package:unofficial_jisho_api/api.dart';
|
|
|
|
abstract class KanjiState {
|
|
const KanjiState();
|
|
}
|
|
|
|
class KanjiSearchInitial extends KanjiState {
|
|
const KanjiSearchInitial();
|
|
}
|
|
|
|
class KanjiSearchInput extends KanjiState {
|
|
final List<String> kanjiSuggestions;
|
|
const KanjiSearchInput(this.kanjiSuggestions);
|
|
}
|
|
|
|
class KanjiSearchLoading extends KanjiState {
|
|
const KanjiSearchLoading();
|
|
}
|
|
|
|
class KanjiSearchFinished extends KanjiState {
|
|
final KanjiResult kanji;
|
|
final bool starred;
|
|
|
|
const KanjiSearchFinished({
|
|
this.kanji,
|
|
this.starred = false,
|
|
});
|
|
}
|
|
|
|
class KanjiSearchError extends KanjiState {
|
|
final String message;
|
|
|
|
const KanjiSearchError(this.message);
|
|
} |