Dalí

An image loading and caching library for flutter focused on speed and memory efficiency.

Supports iOS and Android.

Dalí saves the downloaded image in memory in case the same image is requested in the future. Only a resized version with the desired size will be loaded in memory instead of loading the full size in order to preserve RAM memory.

Images are also saved in the cache directory of the app.

Getting Started

Use the Dali widget

The easier way is to use the Dali widget. It will get the dimensions of his container and load a resized image

Container(
  height: 200,
  width: 200,
  child: Dali(
    'https://homepages.cae.wisc.edu/~ece533/images/airplane.png',
  ),
)

You have the option to set a loading widget while the image is being loaded, and also an error widget if it occurs

Dali(
  imageUrl: 'https://homepages.cae.wisc.edu/~ece533/images/airplane.png',
  fit: BoxFit.cover,
  placeholder: Icon(Icons.timer),
  errorWidget: Icon(Icons.error),
)

Use the DaliImageProvider

Alternatively you can use the DaliImageProvider in combination with the Image widget

Image(
  image: DaliImageProvider(
    'https://homepages.cae.wisc.edu/~ece533/images/airplane.png',
    width: 90,
    height: 90,
  ),
  fit: BoxFit.cover,
)

Remember it is always better to set the width and height of the image

Libraries

cached_image
cached_image_provider
dali
dali_cache_manager
site

Dart

dart:ui
Built-in types and core primitives for a Flutter application. [...]

Core

dart:async
Support for asynchronous programming, with classes such as Future and Stream. [...]
dart:collection
Classes and utilities that supplement the collection support in dart:core. [...]
dart:convert
Encoders and decoders for converting between different data representations, including JSON and UTF-8. [...]
dart:core
Built-in types, collections, and other core functionality for every Dart program. [...]
dart:developer
Interact with developer tools such as the debugger and inspector. [...]
dart:math
Mathematical constants and functions, plus a random number generator. [...]
dart:typed_data
Lists that efficiently handle fixed sized data (for example, unsigned 8 byte integers) and SIMD numeric types. [...]

VM

dart:io
File, socket, HTTP, and other I/O support for non-web applications. [...]
dart:isolate
Concurrent programming using isolates: independent workers that are similar to threads but don't share memory, communicating only via messages. [...]