getImage method

DioImage getImage(
  1. String imageId, {
  2. bool fullsize = false,
})

Returns an image from an id as a Uint8List

Implementation

DioImage getImage(String imageId, {bool fullsize = false}) {
  String url;
  if (imageId.startsWith("https")) {
    url = imageId;
  } else if (imageId.contains("/")) {
    url = "https://www.lectio.dk$imageId";
  } else {
    url = buildUrl(
        "GetImage.aspx?pictureid=$imageId${fullsize ? "&fullsize=1" : ""}");
  }
  return DioImage.string(url);
}