fromJson static method

CustomerImageModel? fromJson(
  1. dynamic value
)

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

Implementation

// ignore: prefer_constructors_over_static_methods
static CustomerImageModel? fromJson(dynamic value) {
  if (value is Map) {
    final json = value.cast<String, dynamic>();
    return CustomerImageModel(
      customerId: mapValueOfType<int>(json, r'customerId')!,
      image: mapValueOfType<String>(json, r'image')!,
      lastUpdated: mapDateTime(json, r'lastUpdated', r'')!,
    );
  }
  return null;
}