lesnitsky / flutter_localstorage

📦 LocalStorage for Flutter
MIT License
301 stars 60 forks source link

Store into External Storage #4

Closed spidgorny closed 5 years ago

spidgorny commented 5 years ago

Current version stores data into /data folder which is not easily accessible. Would be nice to be able to save into external storage (sd card).

lesnitsky commented 5 years ago

@spidgorny Any suggestions on API?

spidgorny commented 5 years ago

How about getExternalStorageDirectory() from path_provider? No support for iOS - I know, then fall back to getApplicationDocumentsDirectory().

@see https://github.com/flutter/plugins/blob/master/packages/path_provider/lib/path_provider.dart#L61

lesnitsky commented 5 years ago

@spidgorny I meant localstorage api. I think it's better to leave a choice for package users, rather than just changing file location internally. How about

new LocalStorage(key, path)

so that users could specify location themselves (using path_provider API directly)

spidgorny commented 5 years ago

Yes, that sounds even better.