ErrorInfo.fromJson constructor
ErrorInfo.fromJson(
- Object? j
Implementation
factory ErrorInfo.fromJson(Object? j) {
final json = j as Map<String, Object?>;
return ErrorInfo(
domain: switch (json['domain']) {
null => null,
Object $1 => decodeString($1),
},
metadatas: switch (json['metadatas']) {
null => {},
Map<String, Object?> $1 => {
for (final e in $1.entries)
decodeString(e.key): decodeString(e.value),
},
_ => throw const FormatException('"metadatas" is not an object'),
},
reason: switch (json['reason']) {
null => null,
Object $1 => decodeString($1),
},
);
}