copyWith method

NotificationsState copyWith({
  1. List<AppNotification>? notifications,
  2. int? unreadCount,
  3. bool? isLoading,
  4. String? error,
  5. bool? hasNextPage,
  6. int? currentPage,
})

Implementation

NotificationsState copyWith({
  List<AppNotification>? notifications,
  int? unreadCount,
  bool? isLoading,
  String? error,
  bool? hasNextPage,
  int? currentPage,
}) => NotificationsState(
  notifications: notifications ?? this.notifications,
  unreadCount: unreadCount ?? this.unreadCount,
  isLoading: isLoading ?? this.isLoading,
  error: error,
  hasNextPage: hasNextPage ?? this.hasNextPage,
  currentPage: currentPage ?? this.currentPage,
);