kineapps / flutter_archive

Flutter plugin for creating and extracting ZIP files.
https://pub.dev/packages/flutter_archive
BSD 3-Clause "New" or "Revised" License
57 stars 43 forks source link

Fix ZipFileOperation enum raw value #36

Closed mrcsilverfox closed 2 years ago

mrcsilverfox commented 3 years ago

I tested only iOS platform

mrcsilverfox commented 3 years ago

Only the cancel FileOperation on iOS worked well. Skip and include did't work

kinex commented 3 years ago

Thanks for the PR, yes I agree there is an issue. Unfortunately the "unit test" (example app) does not catch this. To keep code simpler I would prefer using ZipFileOperation(rawValue:) as it was and instead fix mapping enum values to strings in _progressOperationToString (flutter_archive.dart). So instead of mapping ZipFileOperation.skipItem to "skip", map it to "skipItem" etc. You need to update Kotlin code too.

kinex commented 2 years ago

Fixed by https://github.com/kineapps/flutter_archive/commit/9d6abc596d0358a4307565b17641d9b898d51f38