SimpleErrorCollection.fromJson constructor

SimpleErrorCollection.fromJson(
  1. Map<String, Object?> json
)

Implementation

factory SimpleErrorCollection.fromJson(Map<String, Object?> json) {
  return SimpleErrorCollection(
    errorMessages: (json[r'errorMessages'] as List<Object?>?)
            ?.map((i) => i as String? ?? '')
            .toList() ??
        [],
    errors: json[r'errors'] as Map<String, Object?>?,
    httpStatusCode: (json[r'httpStatusCode'] as num?)?.toInt(),
  );
}