getImageOperation function

CancelableOperation<Uint8List> getImageOperation(
  1. String url
)

Implementation

CancelableOperation<Uint8List> getImageOperation(String url) =>
    CancelableOperation.fromFuture(
      NetworkAssetBundle(Uri.parse(url))
          .load(url)
          .then((value) => value.buffer.asUint8List()),
      onCancel: () => 'images/template.png'.localeFileData(),
    );