|
- part of 'plot_detail_bloc.dart';
-
- abstract class PlotDetailState {
- const PlotDetailState();
-
- @override
- List<Object> get props => [];
- }
-
- class PlotDetailInitial extends PlotDetailState {}
-
- class PlotDetailLoading extends PlotDetailState {}
-
- class PlotDetailFailure extends PlotDetailState {
- final String errorString;
- PlotDetailFailure({required this.errorString});
- }
-
- class PlotDetailSuccess<T> extends PlotDetailState {
- final T? ownerItem;
- final List<T> items;
- final int page;
- final bool hasReachedMax;
-
- const PlotDetailSuccess({this.ownerItem, required this.items, required this.page, required this.hasReachedMax});
-
- PlotDetailSuccess copyWith({required List<T> items, required int page, required bool hasReachedMax}) {
- return PlotDetailSuccess(items: items ?? this.items, page: page ?? this.page, hasReachedMax: hasReachedMax ?? this.hasReachedMax);
- }
-
- @override
- List<Object> get props => [items, hasReachedMax];
- }
|