compressWithList function sometimes gives the following error:
Unhandled Exception: type 'Null' is not a subtype of type 'FutureOr<Uint8List>'
I have tried calling this function with the same bytes that are read from the same picture selected with image picker library in a loop. The result is the function sometimes compresses the picture successfully and sometimes gives the error above.
Instance of 'XFile'
4322440
type 'Null' is not a subtype of type 'FutureOr<Uint8List>'
type 'Null' is not a subtype of type 'FutureOr<Uint8List>'
type 'Null' is not a subtype of type 'FutureOr<Uint8List>'
type 'Null' is not a subtype of type 'FutureOr<Uint8List>'
346085
compressWithList function sometimes gives the following error:
I have tried calling this function with the same bytes that are read from the same picture selected with image picker library in a loop. The result is the function sometimes compresses the picture successfully and sometimes gives the error above.
Relevant code is below:
Output: