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

[Linux] change the save directory of Hive.initFlutter() #748

Open
antebandov opened this issue Jul 31, 2021 · 3 comments
Open

[Linux] change the save directory of Hive.initFlutter() #748

antebandov opened this issue Jul 31, 2021 · 3 comments
Labels
enhancement New feature or request

Comments

@antebandov
Copy link

Is your feature request related to a problem? Please describe.
The Hive.initFlutter() method sets the directory for the database files to '$HOME/Documents'. On Linux systems user-specific application files should be saved to the '$HOME/.local/share/' directory. This directory can be retrieved by the path_provider package with the getApplicationSupportDirectory() method.

Describe the solution you'd like
On Linux systems the Hive.initFlutter() method should call the getApplicationSupportDirectory() to retrieve the '$HOME/.local/share/' directory.

If the change is appreciated i can create a Pull request.

Version

  • Platform: Linux
  • Flutter version: [e.g. 1.5.4]
  • Hive version: [e.g. 0.5.0]
@antebandov antebandov added the enhancement New feature or request label Jul 31, 2021
@antebandov
Copy link
Author

#746 I just noticed that there is already a pull request regarding my issue.

@baumths
Copy link

baumths commented Jul 31, 2021

Hi!

You can do it yourself for now by using Hive.init() passing in the desired path!

@antebandov
Copy link
Author

Thank you for the suggestion! That's the way i will do it until the feature will be added.

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

No branches or pull requests

2 participants