Hello, I found this as a lovely tutorial for a similar project that I had to do for a course I was taking.
I encountered a slight issue because I wanted to play with this code to try and understand BLoC a little better and in the checkout.dart file, my line 12
"return snapshot.data['cart items'].length > 0" has a build error stating "The method '[]' can't be unconditionally invoked because the receiver can be 'null'."
Is this an issue with a newer version of flutter/dart? I can't for the life of me figure out how to satisfy the compiler.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hello, I found this as a lovely tutorial for a similar project that I had to do for a course I was taking.
I encountered a slight issue because I wanted to play with this code to try and understand BLoC a little better and in the checkout.dart file, my line 12
"return snapshot.data['cart items'].length > 0" has a build error stating "The method '[]' can't be unconditionally invoked because the receiver can be 'null'."
Is this an issue with a newer version of flutter/dart? I can't for the life of me figure out how to satisfy the compiler.