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.

34 lines
765B

  1. part of 'stamp_bloc.dart';
  2. abstract class StampState extends Equatable {
  3. const StampState();
  4. @override
  5. List<Object> get props => [];
  6. }
  7. class StampInitial extends StampState {}
  8. class StampLoading extends StampState {}
  9. class StampFailure extends StampState {
  10. final String errorString;
  11. StampFailure({required this.errorString});
  12. }
  13. class StampSuccess<T> extends StampState {
  14. final List<T>? items;
  15. final int? page;
  16. final bool? hasReachedMax;
  17. const StampSuccess({this.items, this.page, this.hasReachedMax});
  18. StampSuccess copyWith({List<T>? items, int? page, bool? hasReachedMax}) {
  19. return StampSuccess(
  20. items: items ?? this.items,
  21. page: page ?? this.page,
  22. hasReachedMax: hasReachedMax ?? this.hasReachedMax,
  23. );
  24. }
  25. }