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

前端 未结 9 1655
醉酒成梦
醉酒成梦 2021-02-13 20:15

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 co

9条回答
  •  盖世英雄少女心
    2021-02-13 20:44

    The value may be empty therefore youre getting a null error try this if its an optional field:

    new Text(cart_prod_qty == null ? '' : cart_prod_qty),
    

提交回复
热议问题