import '../image_picker/image_picker_util.dart'; import '../people_photo/photo_group.dart'; class ScreenshotsBlurryState { static final PhotoGroup screenshotsPhotoGroup = PhotoGroup( isSelected: false, images: ImagePickerUtil.screenshotPhotos, ); static final PhotoGroup blurryPhotoGroup = PhotoGroup( isSelected: false, images: ImagePickerUtil.blurryPhotos, ); static void removePhotosData(Set selectedPhotosIds) { screenshotsPhotoGroup.images .removeWhere((element) => selectedPhotosIds.contains(element.id)); screenshotsPhotoGroup.selectedPhotosIds .removeWhere((element) => selectedPhotosIds.contains(element)); blurryPhotoGroup.images .removeWhere((element) => selectedPhotosIds.contains(element.id)); blurryPhotoGroup.selectedPhotosIds .removeWhere((element) => selectedPhotosIds.contains(element)); // 如果images为空,删除该 album if (screenshotsPhotoGroup.images.isEmpty && blurryPhotoGroup.images.isEmpty) { return; } } }