I have a custom view that takes in a `Context` as ...
# android
a
I have a custom view that takes in a
Context
as non nullable, because in order to pass it into the parent class it needs to be non nullable. However, inside onCreateViewHolder, I'm given a nullable view group so I can only work with a nullable context. In this scenario, is it okay to put
val context = parent?.context!!
? Is there a more eloquent way to handle this, if for some reason context is null?