InlineMethodOptions.fromJson constructor
InlineMethodOptions.fromJson(})
Implementation
factory InlineMethodOptions.fromJson(
JsonDecoder jsonDecoder,
String jsonPath,
Object? json, {
ClientUriConverter? clientUriConverter,
}) {
json ??= {};
if (json is! Map) {
throw jsonDecoder.mismatch(jsonPath, "'inlineMethod options'", json);
}
bool deleteSource;
if (json case {'deleteSource': var encodedDeleteSource}) {
deleteSource = jsonDecoder.decodeBool(
'$jsonPath.deleteSource',
encodedDeleteSource,
);
} else {
throw jsonDecoder.mismatch(jsonPath, "'deleteSource'", json);
}
bool inlineAll;
if (json case {'inlineAll': var encodedInlineAll}) {
inlineAll = jsonDecoder.decodeBool(
'$jsonPath.inlineAll',
encodedInlineAll,
);
} else {
throw jsonDecoder.mismatch(jsonPath, "'inlineAll'", json);
}
return InlineMethodOptions(deleteSource, inlineAll);
}