|
- part of 'plot_bloc.dart';
-
- abstract class PlotState extends Equatable {
- const PlotState();
-
- @override
- List<Object> get props => [];
- }
-
- class PlotInitial extends PlotState {}
-
- class PlotLoading extends PlotState {}
-
- class PlotFailure extends PlotState {
- final String errorString;
- PlotFailure({required this.errorString});
- }
-
- class PlotSuccess<T> extends PlotState {
- final List<T> items;
- final int page;
- final bool hasReachedMax;
-
- const PlotSuccess({required this.items, required this.page, required this.hasReachedMax});
-
- PlotSuccess copyWith({List<T>? items, int? page, bool? hasReachedMax}) {
- return PlotSuccess(items: items ?? this.items, page: page ?? this.page, hasReachedMax: hasReachedMax ?? this.hasReachedMax);
- }
-
- @override
- List<Object> get props => [items, hasReachedMax];
- }
|