getOnloadingImage method

Future<void> getOnloadingImage({
  1. required String path,
})

Loads an image from a given path asynchronously. Uses _useCase.getOnloadingImage and updates internal state.

Implementation

Future<void> getOnloadingImage({
  required final String path,
}) async {
  startLoading();
  return await _useCase
  .getOnloadingImage(
    path    : path,
    headers : _headers,
    maxSize : _maxSize,
    key     : _key,
  )
  .then(_setData)
  .onError(_setError)
  .whenComplete(() => stopLoading() );
}