1class Product {2 final String name;3 final double price;4 5 const Product(this.name, this.price);6 7 void updatePrice(double newPrice) {8 price = newPrice;9 }10}