part of 'client_jobs_cubit.dart'; abstract class JobsState extends Equatable { @override List get props => []; } class JobsStateLoading extends JobsState {} class JobsStateEmpty extends JobsState {} class JobsStateWithJobs extends JobsState { JobsStateWithJobs(this.clientJobList); final List clientJobList; JobsState removeById(final String id) { final List newJobsList = clientJobList.where((final element) => element.id != id).toList(); if (newJobsList.isEmpty) { return JobsStateEmpty(); } return JobsStateWithJobs(newJobsList); } @override List get props => clientJobList; }