diff --git a/lib/core/models/dictionary/good_response.dart b/lib/core/models/dictionary/good_response.dart index a24c298..c5bc1ea 100644 --- a/lib/core/models/dictionary/good_response.dart +++ b/lib/core/models/dictionary/good_response.dart @@ -17,8 +17,8 @@ class GoodResponse { String name = ''; String? ean; int? articul; - int? price; - int? optPrice; + double? price; + double? optPrice; double? basePrice; int? divisible; String? updatedAt; @@ -30,9 +30,9 @@ class GoodResponse { goodResponseBean.name = map['name'] as String; goodResponseBean.ean = map['ean'] as String; goodResponseBean.articul = map['articul'] as int; - goodResponseBean.price = map['price'] as int; - goodResponseBean.optPrice = map['opt_price'] as int; - goodResponseBean.basePrice = cast(map['base_price']); + goodResponseBean.price = (cast(map['price']) ?? 0).toDouble() ; + goodResponseBean.optPrice = (cast(map['opt_price']) ?? 0).toDouble(); + goodResponseBean.basePrice = (cast(map['base_price']) ?? 0).toDouble(); goodResponseBean.divisible = map['divisible'] as int; goodResponseBean.updatedAt = map['updated_at'] as String; return goodResponseBean;