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.

49 lines
1.1KB

  1. part of 'noti_bloc.dart';
  2. abstract class NotiEvent {
  3. const NotiEvent();
  4. @override
  5. List<Object> get props => [];
  6. }
  7. class DataFetched extends NotiEvent {}
  8. class OnRefresh extends NotiEvent {}
  9. class OnRefreshFromNotification extends NotiEvent {}
  10. class OnUpdate<T> extends NotiEvent {
  11. final int unread;
  12. final int read;
  13. final int? currentItemId;
  14. final List<T> currentItems;
  15. final int currentPage;
  16. final bool hasReachedMax;
  17. OnUpdate(
  18. {required this.unread,
  19. required this.read,
  20. this.currentItemId,
  21. required this.currentItems,
  22. required this.currentPage,
  23. required this.hasReachedMax});
  24. }
  25. class MarkAllNotificationUpdate extends NotiEvent {
  26. final String status;
  27. MarkAllNotificationUpdate({required this.status});
  28. }
  29. class ReceiveDataFromSocket extends NotiEvent {
  30. final List<NotificationDTO> currentItems;
  31. final int? page;
  32. final bool? hasReachedMax;
  33. final NotificationObjectDTO? updatedItemObject;
  34. ReceiveDataFromSocket({
  35. required this.currentItems,
  36. this.page,
  37. this.hasReachedMax,
  38. this.updatedItemObject,
  39. });
  40. }