Skip to content

Package[Version] new fields: isAdminDeleted, adminDeletedAt #8778

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 22, 2025

Conversation

isoos
Copy link
Collaborator

@isoos isoos commented May 21, 2025

@isoos isoos requested review from jonasfj and sigurdm May 21, 2025 11:40
..assignedTags = []
..deletedVersions = [];
}

// Convenience Fields:

bool get isVisible => !isModerated;
bool get isVisible => !isModerated && !(isAdminDeleted ?? false);
bool get isNotVisible => !isVisible;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need this negated getter?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find it slightly more readable to use p.isNotVisible vs !p.isVisible, but don't really have strong preference. E.g. a similar API from the SDK is List.isEmpty and .isNotEmpty - I like to use both.

@isoos isoos merged commit 4dce8b3 into dart-lang:master May 22, 2025
31 checks passed
@isoos isoos deleted the is-admin-deleted branch May 22, 2025 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants