-
Notifications
You must be signed in to change notification settings - Fork 28.5k
Copy large file from Assets Folder to Application Documents Folder #26465
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Any detail or log, how it fails. It fails when building? Or it builds successfully but fails to run the logic properly? Besides, |
I think there should be an Stream<List<int>> openRead ([
int start,
int end
]) on A better way for this concrete use case would be to use a native file copy method |
I finally made (what @zoechi suggested also) - I created a Flutter plugin that does the desired large-File copy natively in iOS and Android respectively. My |
I came across the same use case. Thanks, |
We got the same issue on our app. It was for the database. We decided to split this database into small file of 50mb each (db_part01, db_part02, etc). Our database size was around 400mb. App stop crashing and this system is not very slow. We are still looking for a better solution... |
Any update? |
@iKK001 Why not put the kennel to work and implement using memory mapped files in Dart? |
Steps to Reproduce
Hi,
I try to use a large db-file. And therefore, my code copies this file from the Assets folder to the Application-Documents-Folder as can be seen in the code-example below.
For small files, my code works perfectly fine and I can work with my DB perfectly fine.
However, if I try it with a large db-File (>665MB), things start to break as for my Android-part of my Flutter app. (in fact, iOS works perfectly fine, no matter how large the db-File really is....). Only for Android, a large db-File breaks things.
The following Dart code does not work for a large File (>665MB) - (however it works for small files):
I tried to play around with the
gradle.properties
File of the Android part of my Flutter App.Inside gradle.properties, I tried:
org.gradle.jvmargs=-Xmx3g -XX:MaxPermSize=2048m
But unfortunately, no success.
Do you have any idea on how to make all this work with a large (>665MB) File ????
The text was updated successfully, but these errors were encountered: