Jisho-Study-Tool/lib/bloc/search/search_state.dart

26 lines
456 B
Dart
Raw Normal View History

2020-07-09 20:06:48 +02:00
part of 'search_bloc.dart';
@immutable
2020-08-19 16:26:25 +02:00
abstract class SearchState {
const SearchState();
}
2020-07-09 20:06:48 +02:00
2020-08-19 16:26:25 +02:00
class SearchInitial extends SearchState {
const SearchInitial();
}
2020-07-09 20:06:48 +02:00
2020-08-19 16:26:25 +02:00
class SearchLoading extends SearchState {
const SearchLoading();
}
2020-07-09 20:06:48 +02:00
2020-08-19 16:26:25 +02:00
class SearchFinished extends SearchState {
2020-08-19 18:25:45 +02:00
final List<JishoResult> results;
2020-07-09 20:06:48 +02:00
2020-08-19 18:25:45 +02:00
const SearchFinished(this.results);
2020-08-19 16:26:25 +02:00
}
class SearchError extends SearchState {
final String message;
const SearchError(this.message);
}