dvMoneyFromJson function
A money object from {amount, currency}, or null.
Implementation
DVMoney? dvMoneyFromJson(Object? json) {
if (json is! Map) return null;
final Object? amount = json['amount'];
final Object? currency = json['currency'];
if (amount is! int || currency is! String) return null;
return DVMoney(amount: amount, currency: currency);
}