Skip to content
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

Doubts about the package #5

Open
rdnobrega opened this issue May 16, 2021 · 5 comments
Open

Doubts about the package #5

rdnobrega opened this issue May 16, 2021 · 5 comments

Comments

@rdnobrega
Copy link

Hi! Great package!

I have a few questions:

  1. Is there any file size control/management? As I understand, web local storage only goes up to 5MB, what happens if that limit is reached?
  2. Is there a way to delete everything saved? Other than putting everything under 1 collection and 1 doc after that;
@HannesGitH
Copy link

+1

would be highly interested in 2.

@HannesGitH
Copy link

HannesGitH commented Jan 22, 2022

i've had a quick look and this package just stores the documents as files in the AppDir

final dir = await getApplicationDocumentsDirectory();

so simply clearing that (via) Directory(await getApplicationDocumentsDirectory()).delete() could do the trick

though

  • i havent tested
  • all other local files would be removed as well

@AyeshaIftikhar
Copy link

``> i've had a quick look and this package just stores the documents as files in the AppDir

final dir = await getApplicationDocumentsDirectory();

so simply clearing that (via) Directory(await getApplicationDocumentsDirectory()).delete() could do the trick

though

  • i havent tested
  • all other local files would be removed as well

Hi there!
I have tried your answer and it does not work for me at least. It straight gives the following error:
FileSystemException: Deletion failed, path = '/data/user/0/com.example.appname/app_flutter' (OS Error: Directory not empty, errno = 39)

@HannesGitH
Copy link

@AyeshaIftikhar
i still havent tested myself, but to delete a non-empty directory youd want to pass recursive: true to the deletion function

@AyeshaIftikhar
Copy link

@AyeshaIftikhar i still havent tested myself, but to delete a non-empty directory youd want to pass recursive: true to the deletion function

I have tried that too that does not work either

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants