getUrlForImage method
String
getUrlForImage(
- String? url,
- RESOLUTION_TYPE? resolution,
- SERVICE_TYPE? service_type, {
- bool shouldprint = false,
- required String urlWithoutHttp,
Implementation
String getUrlForImage(
String? url, RESOLUTION_TYPE? resolution, SERVICE_TYPE? service_type,
{bool shouldprint = false, required String urlWithoutHttp}) {
String? imageName;
if (url != null) {
var s = url.split('/');
imageName = s[s.length - 1];
}
var queryParameters = {
'name': imageName,
'resolution': resolution.type,
'service_type': service_type.type
};
var uri =
Uri.https(urlWithoutHttp, '/api/v1/file/media/read', queryParameters)
.toString();
return uri;
}