enum SendPhotoStatus { initial, loading, success, failure } class SendPhotoState { final SendPhotoStatus status; final List selectedImages; final List recievedPhotoIds; final String errorMessage; const SendPhotoState({ this.status = SendPhotoStatus.initial, this.selectedImages = const [], this.recievedPhotoIds = const [], this.errorMessage = '', }); SendPhotoState copyWith({ SendPhotoStatus? status, List? selectedImages, List? recievedPhotoIds, String? errorMessage, }) { return SendPhotoState( status: status ?? this.status, selectedImages: selectedImages ?? this.selectedImages, recievedPhotoIds: recievedPhotoIds ?? this.recievedPhotoIds, errorMessage: errorMessage ?? this.errorMessage, ); } bool get hasSelectedImages => selectedImages.isNotEmpty; }