[used json annotation and serializable ][1]
[Not understanding the error][2]
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.
Copyright © 2021 Jogjafile Inc.
You can't name the instance of the object with the same name as the object. This will do the trick:
You class's names also should start with uppercase letter for clarity. I recommand you to read this.