Error.fromJson constructor
Error.fromJson(
- Object? j
Implementation
factory Error.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return Error(
errors: switch (json['errors']) {
null => [],
List<Object?> $1 => [for (final i in $1) Errors.fromJson(i)],
_ => throw const FormatException('"errors" is not a list'),
},
);
}