canProvideImageFile method

  1. @override
Future<bool> canProvideImageFile()

This will need to be updated if getImageFileAsBytes updated. Notice that even if the copied image is JPEG, it still can be provided as PNG, will handle JPEG check in case this info is incorrect.

Implementation

@override
Future<bool> canProvideImageFile() async {
  final canProvidePngFile = await _canProvide(format: Formats.png);
  if (canProvidePngFile) {
    return true;
  }
  final canProvideJpegFile = await _canProvide(format: Formats.jpeg);
  if (canProvideJpegFile) {
    return true;
  }
  return false;
}