본문 바로가기
Development Solutions/Flutter & Dart

[flutter] The method '+' was called on null.

by studio ODOC 2021. 10. 28.
반응형

null safety check를 안해서 나오는 에러메시지입니다.

Text(cart_prod_qty)

위를 아래와 같이 처리하시면 해결됩니다.

Text(cart_prod_qty??'default value')

 

https://stackoverflow.com/questions/56351386/a-non-null-string-must-be-provided-to-a-text-widget

 

A non-null String must be provided to a Text widget

I'm trying to add the option for the quantity to be adjusted but I get an error saying "A non-null String must be provided to a Text widget" How do I provide this, to this code? trailing: Contai...

stackoverflow.com

 

반응형