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.

46 lines
1.0KB

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