SourceItemsItem.fromJson constructor
SourceItemsItem.fromJson(
- Object? json
Implementation
factory SourceItemsItem.fromJson(Object? json) {
final map = (json as Map).cast<String, Object?>();
return SourceItemsItem(
amount: map['amount'] == null ? null : (map['amount'] as num).toInt(),
currency: map['currency'] == null ? null : (map['currency'] as String),
description:
map['description'] == null ? null : (map['description'] as String),
parent: map['parent'] == null ? null : (map['parent'] as String),
quantity:
map['quantity'] == null ? null : (map['quantity'] as num).toInt(),
type: map['type'] == null
? null
: SourceItemsItemType.fromJson(map['type']),
);
}