ErrorCollection.fromJson constructor

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

Implementation

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