Open wadychou opened 1 year ago
if you use ByteData data = await rootBundle.load(dbAsset);
to load a zip file, you may counter this problem
Change
var bytes = data.buffer.asUint8List();
to:
var bytes = data.buffer.asUint8List().sublist(0);
@wadychou were you able to fix the issue please?
Flutter stable, 3.7.5 archive: ^3.3.6
my code:
error:
[VERBOSE-2:dart_vm_initializer.cc(41)] Unhandled Exception: Unsupported operation: Cannot modify an unmodifiable list
0 _UnmodifiableUint8ArrayView.[]= (dart:typed_data-patch/typed_data_patch.dart:5391:5)
1 ZipFile._decodeZipCrypto (package:archive/src/zip/zip_file.dart:194:12)
2 ZipFile.content (package:archive/src/zip/zip_file.dart:131:27)
3 ZipDecoder.decodeBuffer (package:archive/src/zip_decoder.dart:35:41)
4 ZipDecoder.decodeBytes (package:archive/src/zip_decoder.dart:16:12)
@brendan-duncan @brendan-duncan-g