Jisho-Study-Tool/lib/bloc/kanji/kanji_state.dart

32 lines
569 B
Dart
Raw Normal View History

2020-07-13 15:18:17 +02:00
import 'package:unofficial_jisho_api/api.dart';
2020-07-09 20:06:48 +02:00
2020-07-13 15:18:17 +02:00
abstract class KanjiState {
const KanjiState();
}
2020-07-09 20:06:48 +02:00
2020-07-13 15:18:17 +02:00
class KanjiSearchInitial extends KanjiState {
KanjiSearchInitial();
}
2020-07-09 20:06:48 +02:00
2020-07-13 15:18:17 +02:00
class KanjiSearchLoading extends KanjiState {
KanjiSearchLoading();
}
2020-07-09 20:06:48 +02:00
2020-07-13 15:18:17 +02:00
class KanjiSearchFinished extends KanjiState {
final KanjiResult kanji;
2020-07-14 14:57:03 +02:00
final bool starred;
2020-07-09 20:06:48 +02:00
2020-07-14 14:57:03 +02:00
KanjiSearchFinished({
this.kanji,
this.starred = false,
});
2020-07-13 15:18:17 +02:00
}
class KanjiSearchError extends KanjiState {
final String message;
KanjiSearchError(this.message);
}
2020-07-09 20:06:48 +02:00
class ReKanjiSearch extends KanjiState {}