fromJson static method
Returns a new CreateInvoiceModel instance and imports its values from
value
if it's a Map, null otherwise.
Implementation
// ignore: prefer_constructors_over_static_methods
static CreateInvoiceModel fromJson(dynamic value) {
final json = value.cast<String, dynamic>();
return CreateInvoiceModel(
customerId: mapValueOfType<int>(json, r'customerId')!,
description: mapValueOfType<String>(json, r'description')!,
month: MonthDate.fromJson(json[r'month']),
date: mapDateTime(json, r'date', '')!,
discount: mapValueOfType<double>(json, r'discount')!,
value: mapValueOfType<double>(json, r'value')!,
);
}