You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
975B

  1. part of 'plot_parameter_bloc.dart';
  2. abstract class PlotParameterState extends Equatable {
  3. const PlotParameterState();
  4. @override
  5. List<Object> get props => [];
  6. }
  7. class PlotParameterInitial extends PlotParameterState {}
  8. class PlotParameterLoading extends PlotParameterState {}
  9. class PlotParameterFailure extends PlotParameterState {
  10. final String? errorString;
  11. PlotParameterFailure({required this.errorString});
  12. }
  13. class PlotParameterSuccess<T> extends PlotParameterState {
  14. final List<T>? items;
  15. final int? page;
  16. final bool? hasReachedMax;
  17. const PlotParameterSuccess({this.items, this.page, this.hasReachedMax});
  18. PlotParameterSuccess copyWith({
  19. List<T>? items,
  20. int? page,
  21. bool? hasReachedMax,
  22. }) {
  23. return PlotParameterSuccess(
  24. items: items ?? this.items,
  25. page: page ?? this.page,
  26. hasReachedMax: hasReachedMax ?? this.hasReachedMax,
  27. );
  28. }
  29. // @override
  30. // List<Object> get props => [items, hasReachedMax];
  31. }