bytes_image_viewer 0.0.5

SDKflutter
Platformandroidioswindowslinuxmacosweb

This image viewer, takes the url which returns the bytes as image. You can implement it with authorization factor.

This is a very simple widget. You can use it when: Your GET IMAGE API returns Uint8List.

Features

No need to write api calling and then pass the result to any other image viewer.

Usage

please find the example here /example.

BytesImageViewer(
  height:100, //optional
  width:100,//optional
  fit: BoxFit.cover,//optional
  apiUrl:'image url',
  headers: {
    "Authorization":
    "Bearer yTiIsInN1YiI6IjEiLC"
  }, //optional
  loadingWidget: CircularProgressIndicator(
          color: Colors.red,
      ),//optional
  errorWidget: CircularProgressIndicator(
          color: Colors.red,
      ),//optional
);

###Additional information

AttributesDesscription
BytesImageViewerA widget that shows your image from the network image url(That returns Uint8List).
heightHeight of the image view
widthwidth of the image view
headersYou can provide any kind of header information for eg authorization token, content-type etc. (You can use this if you image requires any kind of authorization).
loadingWidgetThis widget is shown during the image is being downloaded from the network. You can consider it as a placeholder.
errorWidgetThis widget shows when any error occurred. And BytesImageViewer is unable to show the image from the network url.