getImageFile abstract method

Stream<FileResponse> getImageFile(
  1. String url, {
  2. String? key,
  3. Map<String, String>? headers,
  4. bool withProgress = false,
  5. int? maxHeight,
  6. int? maxWidth,
})

Returns a resized image file to fit within maxHeight and maxWidth.

It tries to keep the aspect ratio. It stores the resized image by adding the size to the key or url. When the resized file is not found in the cache the original is fetched from the cache or online and stored in the cache. Then it is resized and returned to the caller.

Implementation

Stream<FileResponse> getImageFile(
  String url, {
  String? key,
  Map<String, String>? headers,
  bool withProgress = false,
  int? maxHeight,
  int? maxWidth,
});