// I am getting an error at widget.product.id, // The argument type 'int?' can't be assigned to the parameter type 'int'.
updateRoutine() async {
final productCollection = widget.isar.products;
await widget.isar.writeTxn((isar) async {
final product = await productCollection.get(widget.product.id);
product!
..name = nameController.text
..price = double.parse(priceController.text)
..quantity = int.parse(quantityController.text);
await productCollection.put(product);
});
}