compress method

void compress(
  1. dynamic onBytesLoaded(),
  2. dynamic onLibraryImageLoaded(
    1. Image
    )
)

compressed image is shown for user's reference

Implementation

void compress(Function() onBytesLoaded,
    Function(Library.Image) onLibraryImageLoaded) async {
  final libraryImage = getCompressedImage(imageBytes);
  onBytesLoaded.call();
  onLibraryImageLoaded.call(libraryImage);
}