fromJson static method

BankStatement? fromJson(
  1. dynamic value
)

Returns a new BankStatement instance and imports its values from value if it's a Map, null otherwise.

Implementation

// ignore: prefer_constructors_over_static_methods
static BankStatement? fromJson(dynamic value) {
  if (value is Map) {
    final json = value.cast<String, dynamic>();

    return BankStatement(
      id: mapValueOfType<int>(json, r'id')!,
      organizationId: mapValueOfType<String>(json, r'organizationId')!,
      description: mapValueOfType<String>(json, r'description')!,
      value: mapValueOfType<double>(json, r'value')!,
      tag: mapValueOfType<String>(json, r'tag'),
      employeeId: mapValueOfType<int>(json, r'employeeId')!,
      customerId: mapValueOfType<int>(json, r'customerId'),
      date: mapDateTime(json, r'date', r'')!,
    );
  }
  return null;
}