0

[used json annotation and serializable ][1]

[Not understanding the error][2]

1 Answers1

0

You can't name the instance of the object with the same name as the object. This will do the trick:

addproductmodel _addproductmodel = addproductmodel(product_name: _productname.text);

You class's names also should start with uppercase letter for clarity. I recommand you to read this.

Milvintsiss
  • 1,420
  • 1
  • 18
  • 34