fromJson static method
Returns a new AccountDetailModel instance and imports its values from
value
if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static AccountDetailModel? fromJson(dynamic value) {
if (value is Map) {
final json = value.cast<String, dynamic>();
return AccountDetailModel(
fullyPaid: mapValueOfType<bool>(json, r'fullyPaid')!,
isInvoice: mapValueOfType<bool>(json, r'isInvoice')!,
valueDue: mapValueOfType<double>(json, r'valueDue')!,
description: mapValueOfType<String>(json, r'description')!,
date: mapDateTime(json, r'date', r'')!,
invoiced: mapValueOfType<double>(json, r'invoiced')!,
paid: mapValueOfType<double>(json, r'paid')!,
balance: mapValueOfType<double>(json, r'balance')!,
documentId: mapValueOfType<int>(json, r'documentId')!,
);
}
return null;
}