fromUint8List method

Future<void> fromUint8List({
  1. required Uint8List bytes,
  2. required String name,
})

Creates image data from a Uint8List of bytes and a file name.

Implementation

Future<void> fromUint8List({
  required final Uint8List  bytes,
  required final String     name
}) async {
  startLoading();
  await _useCase
  .createDTO(
    key     : _key,
    maxSize : _maxSize,
    data    : bytes,
    path    : "blob/$name",
  )
  .then(_setData)
  .onError(_setError)
  .whenComplete(() => stopLoading() );
}