I have a 2-d list, I am adding data using `
quotationList.add( [productName.text, double.parse(productPrice.text), _n] );`
output is:
[[qwe, 555.0, 1], [qwe 1, 5555.0, 2]]
now i want to add this 2-d list into my products list, i can't figure out how to do that? my products list looks like this, with static data
final products = <Product>[
Product('1', "random text", 3.99, 2),
Product('2', "random text", 15, 2),
Product('3', "random text", 6.95, 3),
Product('4', "random text", 49.99, 4),
];
i want to make make it dynamic using some loops or something, like this
final products = <Product>[
for(int i=0; i<quotationList.length; i++)
{
Product(i.toString(), quotationList[i][0], quotationList[i][1], quotationList[i][2]),
}
];
but i got this error
The element type 'Set<Product>' can't be assigned to the list type 'Product'.