getImageFileAsBytes method

  1. @override
Future<Uint8List> getImageFileAsBytes()

This will need to be updated if canProvideImageFile updated.

Implementation

@override
Future<Uint8List> getImageFileAsBytes() async {
  final canProvidePngFile = await _canProvide(format: Formats.png);
  if (canProvidePngFile) {
    return _provideFileAsBytes(format: Formats.png);
  }
  return _provideFileAsBytes(format: Formats.jpeg);
}