Skip to content

Conversation

@isoos
Copy link
Collaborator

@isoos isoos commented May 21, 2025

@isoos isoos requested review from jonasfj and sigurdm May 21, 2025 11:40

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