In a using custom views, I override onDraw(canvas:Canvas?) method many times , but I don't understand why this method get a nullable Canvas , shouldn't a view always have a canvas to draw on when it is time to draw?.
I also asserted it non null and it works , but I don't want to take that risk , may be at some point it gets null.
So first I want to understand in what situations that parameter can be null?
or is it just coming from java to kotlin conversion process and i can safely remove the ?from the parameter?
Thanks