I have a column like this:
Column(children: [
product.videos![product.videoIndex].videoUrl != null &&
product.videos![product.videoIndex].videoUrl != ""
? VideoPlayerWidget(
videoAddress: product.videos![product.videoIndex].videoUrl)
: Image.asset('assets/images/video-placeholder.jpg'),
]),
And I get this error:
_CastError (Null check operator used on a null value)
I know that the variables may be null and that's the reason I put them within a null check if statement, but I don't know why do I get the null check error and how can I pass that?
The Flutter forced me to put !
after null variables, then it gives me error because of that!