flutter_sqlcipher icon indicating copy to clipboard operation
flutter_sqlcipher copied to clipboard

insert() fixed on Android 10 and new SQLCipher version

Open develhox opened this issue 6 years ago • 1 comments

This commit fix two issues.

First of all, the insert() method was broken on my Pixel 2 XL with the Android 10 update. The convertMapToContentValues() method always returned null. I fixed it by filling the ContentValues explicitly instead of relying on a Parcel. I think this may be a little slower, but at least it works.

I also changed the SQLCipher version to the 4.2.0 to get rid of an annoying log.

develhox avatar Nov 17 '19 00:11 develhox

I checked the Parcel source code and I didn't understand why it didn't work anymore. However in the end it does what I am doing, but with more steps, so probably the performance may not be worse in my solution, but even a little better. By reviewing that code I found a way to improve my solutions, therefore I made a new commit. Instead of cycling on the Map keys and then searching in the map for the corresponding value, I am cycling directly on the entries.

develhox avatar Nov 17 '19 00:11 develhox