getImage method
Future<DynamiteResponse<Uint8List, void> >
getImage({
- required String key,
- ThemingGetImageUseSvg? useSvg,
Get an image.
Returns a Future containing a DynamiteResponse
with the status code, deserialized body and headers.
Throws a DynamiteApiException
if the API call does not return an expected status code.
Parameters:
useSvg
Return image as SVG. Defaults to1
.key
Key of the image.
Status codes:
- 200: Image returned
- 404: Image not found
- 500
See:
- getImageRaw for an experimental operation that returns a
DynamiteRawResponse
that can be serialized.
Implementation
Future<_i1.DynamiteResponse<Uint8List, void>> getImage({
required String key,
ThemingGetImageUseSvg? useSvg,
}) async {
final rawResponse = getImageRaw(
key: key,
useSvg: useSvg,
);
return rawResponse.future;
}