Skip to content

Commit

Permalink
fix error: The argument type 'List<int>' can't be assigned to the par…
Browse files Browse the repository at this point in the history
…ameter type 'Uint8List'. (#28)
  • Loading branch information
Hilbert2048 authored Oct 22, 2024
1 parent b35e5d1 commit 1c0347b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/src/readers/book_cover_reader.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import 'dart:async';
import 'dart:typed_data';

import 'package:collection/collection.dart' show IterableExtension;
import 'package:image/image.dart' as images;
Expand Down Expand Up @@ -40,7 +41,7 @@ class BookCoverReader {
coverImageContentFileRef = bookRef.Content!.Images![coverManifestItem.Href];
var coverImageContent =
await coverImageContentFileRef!.readContentAsBytes();
var retval = images.decodeImage(coverImageContent);
var retval = images.decodeImage(Uint8List.fromList(coverImageContent));
return retval;
}
}

1 comment on commit 1c0347b

@mcmah309
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@SergeShkurko you probabaly want to revert this commit. Since https://github.com/ScerIO/epubx.dart/pull/21/files resolves the need for this.

Please sign in to comment.