07-20-2023, 04:16 PM
I want to negate the following expression:
`return SpUtils.loadEMail()?.isEmpty() ?: false`
If i add a ! before the expression, like
`return !SpUtils.loadEMail()?.isEmpty() ?: false`
The IDE(Android Studio) tells me
> Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type kotlin.Boolean?
How do I negate this kinds of expressions?
`return SpUtils.loadEMail()?.isEmpty() ?: false`
If i add a ! before the expression, like
`return !SpUtils.loadEMail()?.isEmpty() ?: false`
The IDE(Android Studio) tells me
> Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type kotlin.Boolean?
How do I negate this kinds of expressions?