如果我在 Azure 应用服务上托管我的应用程序超过 60 分钟,即使我的应用程序没有进行任何处理,我是否需要付费?
我是 Flutter 新手,正在学习 Udemy 上的课程。我有一个名为 Item 的模型,其final属性如下所示:
class Item {
final String id;
final String title;
final int quantity;
final double price;
Item({
required this.id,
required this.title,
required this.quantity,
required this.price,
});
}
Run Code Online (Sandbox Code Playgroud)
被Item另一个类使用,该类在映射中Cart存储 s 列表,并且它有一个减少数量的方法,如下所示:ItemremoveSingleItem
class Cart with ChangeNotifier {
Map<String, Item> _items = {};
void removeSingleItem(String productId) {
if (!_items.containsKey(productId)) {
return;
}
if (_items[productId]!.quantity > 1) {
_items.update(
productId,
(existingCartItem) => Item(
id: existingCartItem.id,
price: existingCartItem.price,
quantity: existingCartItem.quantity - …Run Code Online (Sandbox Code Playgroud)